Fastis icon indicating copy to clipboard operation
Fastis copied to clipboard

Value of type 'FastisController<FastisRange>.DismissAction' has no member 'fromDate'

Open krishnamurthy-Aosta opened this issue 2 years ago • 1 comments

Unable to get start date from Fastis dismiss handler

krishnamurthy-Aosta avatar Nov 20 '23 13:11 krishnamurthy-Aosta

Hi. DismissAction has two parameters: done(Value?) and cancel. If after selecting the period you click the "done" button, dismissHandler will come to you with the .done(Value?) parameter. By expanding it you can access the property .fromDate (and also .toDate) If you just close the controller, dismissHandler will come to you with the .cancel parameter. In which there will be nothing. Attach the code snippet where you are having the problem so we can help you


let fastisController = FastisController(mode: .range)
    fastisController.dismissHandler = { [weak self] action in
        switch action {
        case .done(let newValue):
            self?.currentValue = newValue
        case .cancel:
            print("any actions")
        }
    }

UriyDevyataev avatar Mar 13 '24 09:03 UriyDevyataev