-
-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time dependence selects different dates #935
Comments
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days. |
This issue was closed because it has been stalled for 14 days with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before you start - checklist
Description
let me preface this by saying I think THIS is how calendar dates should be returned:
I think that if there is a calendar control that deals with dates .. .the hours - minutes - seconds should not "really matter".
The control does not have a "time" specified of the day you wish to start... it merely gives dates - If I am selecting a date range from 1 Apr 2024 to 3 Apr 2024 - the date range returned should be 1 Apr 2024 to 3 Apr 2024.
The 'tileDisabled' dates do not suggest an hours/minutes/seconds:
<Calendar
onChange={setSelectedDates}
calendarType="gregory"
hover
minDate={now}
maxDate={maxDate}
value={selectedDates}
tileDisabled={tileDisabled}
minDate, and value do not include "time values" either
additionally, the function that sets the 'maxDate' (see addMonthsToDate ) does not take into account hours/minutes/seconds
I am confused the calendar control deals with years/months/days with some aspects but then uses hours/minutes/seconds in others
Steps to reproduce
clicked on 1 Apr 2024 and then extended selection to 3 Apr 2024 and click on 3 Apr 2024
Expected behavior
I would expect the selected dates to be 1 Apr 2024 to 3 Apr 2024
Actual behavior
selectedDates is 1 Apr 2024 to 4 Apr 2024
and the time values are always the same:
"2024-04-11T06:00:00.000Z","2024-04-13T05:59:59.999Z"
Additional information
If you can provide sample code that will return the correct dates when a range is selected, regardless of what time zone the control is used - I would be happy with that
Environment
I made my own control - which actually works -regardless of timezone !
The text was updated successfully, but these errors were encountered: