alerts-and-pickers icon indicating copy to clipboard operation
alerts-and-pickers copied to clipboard

How to get date from picker, if opened and closed picker on done event without any changes?

Open kagmanoj25 opened this issue 5 years ago • 1 comments

Picker does not return any value on done button while we don't select anything and just press done button. If i want to get default selected value on done press event then what should i do?

kagmanoj25 avatar Mar 26 '19 10:03 kagmanoj25

you should set the current date in var like var currentDate = Date() then set that variable to your default label or text. Then when you pick any date from picker then update value of currentDate to picked date like currentDate = pickableDate

TayyabAli652 avatar Apr 11 '19 07:04 TayyabAli652