Currently, this is how my Cupertino date picker look like
My code is as shown:
CupertinoDatePicker(
initialDateTime: DateTime.now(),
onDateTimeChanged: (val) {
setState(() {
dateSelected = val;
});
})
How can I make it such that I only allow the user to pick timing after 6 pm and before 3 am, every day?
CodePudding user response:
We cannot limit the timer. We can instead check if the current picked time is equal to our expectations. If not so show the user a dialog or a message to re enter the data and the current data entered is not available. Maybe this works for you.