connect
connect copied to clipboard
improve TimeFilter for custom date
Fixes #462 - This was due to input type of "date" being a timezone-less date and using the local time instead of GMT time. This is discussed here
tl;dr: from the calendar we pick a date (27th July 2012 00:00:00 BST (GMT+1)) which gets converted to (23:00:00 on 26th July 2012) when getting through valueAsDate
The fix is to use UTC to prevent this confusion.
Also set minDate to be startDate for end date selection, this prevents users to be able to choose a date that is before the start date. Before there was no catch for this.
Before fix:
After fix: