Closed matteoberla closed 2 months ago
No change is considered a cancellation, so the corrected value is not returned
Isn't it possibile to adjust the initial data value once showBoardDateTimePicker
is called, so if it isn't rounded correctly it is forces to a valid value of the picker?
Even if it will be rounded to the first valid valu, it would be perfect
i've decided to handle it by rounding the input before opening the picker.
If someone will need to do this type of operation here's a function to do it.
static DateTime nearestQuarter(DateTime val) {
return DateTime(val.year, val.month, val.day, val.hour,
[0, 15, 30, 45][(val.minute / 15).floor()]);
}
Hi,
when custom minutes are set, if i confirm the date without making any change to the date, initial date is returned so it's not rounded to the nearest minute found.
ex. -initial date = 2024-09-12 14:05:00 -confirm selection -returns same date instead of rounded 2024-09-12 14:00:00
here's the code
i'll try to fix the error looking into the code