Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

default date value could be problematic #150

Open
kennethkoontz opened this issue Jul 31, 2018 · 0 comments
Open

default date value could be problematic #150

kennethkoontz opened this issue Jul 31, 2018 · 0 comments

Comments

@kennethkoontz
Copy link

kennethkoontz commented Jul 31, 2018

When a date is selected, with default settings, the onChange function is called with a value that is misleading.

The date value contains the current time like so - 2018-07-31T21:16:25Z. Instead I would expect a value of something like 2018-07-31T00:00:00Z or 2018-07-31T00:00:00-07:00 (moment("20111031", "YYYYMMDD")).

The reason why this is problematic, is that if a user clicks on the date value at the beginning of the day and then clicks that same date at a different time of the day, the date value will be different. Which could lead to unintended results.

I think it makes sense to zero out the dates, or use the results from moment().

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant