You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DateTimeField(
// Is disabled for iOS, only it's decoration is being used.
enabled: platformIsAndroid,
controller: _deadlineController,
format:CreatePollModel.deadLineFormat,
style:Properties.black16RegTextField,
maxLines:1,
onShowPicker: (context, currentValue) async {
final now =DateTime.now();
final date =awaitshowDatePicker(
context: context,
firstDate: now,
initialDate: now,
lastDate: widget.model.maxDate,
);
if (date !=null) {
final time =awaitshowTimePicker(
context: context,
initialTime:TimeOfDay.fromDateTime(currentValue ?? now),
);
returnDateTimeField.combine(date, time);
} else {
return currentValue;
}
},
onFieldSubmitted: widget.model.updateDeadLine,
),
The calendar correctly disables the previous dates from DateTime.now() but when the user selects the current day, the time picker does not "remember" that it shouldn't allow to use an earlier time from the day.
This is the widget I'm working with:
The calendar correctly disables the previous dates from
DateTime.now()
but when the user selects the current day, the time picker does not "remember" that it shouldn't allow to use an earlier time from the day.Please confirm if I'm doing something wrong.
related #25 (comment)
The text was updated successfully, but these errors were encountered: