Selecting date from Calendar resets time portion of the DatePicker value.
Keep the time of the DatePicker value.
Enable DateTime picker behavior
Browser:
All
System:
Reported in TicketID: 1138524
2 more comments:
why does the time gets initialized to 00:00:00, when one clicks on "TODAY"?
I my opinion, time should not be touched.
why is "TODAY" disabled, when [min] is set to a date and time value of today (and time is not eq to 00:00:00)?
I my opinion, "TODAY" should be available as long as [min] is set to today, ignoring time
Thankx for considering.
Harry
Hi @iwhp, thanks for the comments.
Basically we chose to discard the min/max time part, which results in 00:00:00 in this case. When one creates a date, e.g. new Date(2000, 10, 10), the time will be set automatically to 00:00:00. That being said, we reset current time on "TODAY" click to simulate this concept. If min value has time in it, then date that matches this value will be removed from the calendar and will hide TODAY button if it matches today's date.
We will further investigate whether discarding time portion of the Date instance will work for the Calendar. If it is acceptable, we will done it right away.
I will update the thread with more details about the conducted research.
@progress/[email protected] is out. It includes the fix. Will close the issue as fixed.
Please feel free to comment if something is not correct.
I have created a plunker http://plnkr.co/edit/Myv9u0Zj9HmJ3ArvSexN?p=preview (copy from the above) with some changes.
1) run the plunker
2) enter a time in the time field (e.g. 12:13)
3) select a date from the drop-down of the date field (time is still 12:13)
4) enter a date in the date field
--> time is initialized to 00:00
--> time should not be changed
5) change the date
6) enter a time
--> date gets reset
--> date should not be changed
Yep, the DateInput will reset the time. In general, this is normal, because the DateInput creates new date based on the defined format, where the time is not present. Nevertheless, I agree that we should improve this behavior. Please stay tuned for updates in this thread.
Another feedback, that may help to raise the issue.
The control behaves differently when using the keyboard (entering dates) vs. using the drop down.
When using the keyboard, the date gets initialized to either time = 00:00 or date = today.
When using the drop down, the control works as I would expect, not changing time or date (on the other side).