Fastis
Fastis copied to clipboard
Value of type 'FastisController<FastisRange>.DismissAction' has no member 'fromDate'
Unable to get start date from Fastis dismiss handler
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")
}
}