flutter_datetime_picker
flutter_datetime_picker copied to clipboard
showDateTimePicker max limit for hour is not setting for the same day,
if I set the min and max time like this for showDateTimePicker
minTime: DateTime(2020,10,26,12,0),
maxTime: DateTime(2020,10,26,19,59),
it gives me the min time of 12th hour but it is still giving me 23:59 for the maxTime, although I set it to 19.59
Is there a workaround or fix?
i have the same problem, when the set time interval is less than one day
@JunevaYang Did you find a workaround?
@JunevaYang Did you find a workaround?
not
@JunevaYang You can use this fork: https://github.com/yu3fms/flutter_datetime_picker He solved this problem, I used it and it works great
@JunevaYang You can use this fork: https://github.com/yu3fms/flutter_datetime_picker He solved this problem, I used it and it works great
thx
I tried the fork: https://github.com/yu3fms/flutter_datetime_picker with the below code.
But the maxTime does not restrcit the time to plus 4 hours. It shows till the midnight of the same day.
DatePicker.showDateTimePicker(
context,
showTitleActions: true,
minTime: DateTime.now(),
maxTime: DateTime.now().add(Duration(
hours: 4,
)),
onChanged: (date) {
print('change $date');
},
onConfirm: (date) {
print('confirm $date');
},
currentTime: DateTime.now(),
locale: LocaleType.en,
);
},
child: Text(
'Select Time within 4 Hours',
));
Is there anything i am missing or doing wrong?
Hey guys it is still not working for me, has anyone found the solution?