dylanwuzh / flutter-cupertino-date-picker

Flutter cupertino style date picker.
Apache License 2.0
363 stars 414 forks source link

get an author value in on confirm callback #114

Open walide67 opened 3 years ago

walide67 commented 3 years ago

i want to get the date with the format MM/yyyy when i select the date and press confirm i get the month equel to 06 my function : onConfirm: (value){ print('================== value ==============='); print(value); String year = value.year.toString().substring(value.year.toString().length - 2); String month = (value.month.toString().length == 1)?'0${value.month.toString()}':value.month.toString(); expDateAdd.text = '$month/$year'; print('================== date ==============='); print(expDateAdd.text); }