-
Notifications
You must be signed in to change notification settings - Fork 71
[terra-date-time-picker] Does not honor time in maxDateTime (assume minDateTime as well) #524
Comments
Talked about adding a prop to provide access to the invalid date change, potentially |
I think there's a related issue with DateTimePicker and initial values. This seems to be because underneath the DateTimePicker uses the DatePicker, and the DatePicker strips the time off of the selected date before performing it's comparisons to determine if the selected date is valid, but doesn't strip the time off of the minimum and maximum. So, you end up comparing D;T to D (the minimum), which fails, so it considers the value as invalid and clears it. I would expect the date picker to either strip time off of both selected date and min/max date time, or neither. |
@prmeznar After discussing with our team on how to handle the time aspect in terms of the min/max date/time, it turns out that there are some (edge) cases that are difficult for terra-date-time-picker to manage and would lead to an undesired user experience. For that reason, we plan to remove the We still plan to keep the |
After further discussions with the consumers and terra team, it was decided to not completely remove the |
Bug Report
Description
The terra-date-time-picker calls onChange as long as the date is within the minDateTime/maxDateTime range, even if the time makes those values exceed the minDateTime/maxDatetime.
Steps to Reproduce
With onChange set to print some text to the console
Expected Behavior
@ Mentions
@benbcai
The text was updated successfully, but these errors were encountered: