Skip to content

"min" prop works incorrectly for two days a year - days with change to summer/winter time. #1273

Description

@ihar-lapitski

Do you want to request a feature or report a bug?

Bug

What's the current behavior?

Hi guys!
Today (March 31) was the change to summer time.
And I found that "min" prop works incorrectly for such days.
It works incorrectly for two days a year - days with change to summer/winter time.
The reason is that these days duration is not 24 hours but 23 or 25 hours. And then we get "1 hour" shift if we use "min" or "max" props.

Please have a look at my example.
It is March 31 (change to summer time).
Without "min" prop - all is ok
(Grayed regions - it is non-working time in the logic of my app)

Screenshot from 2019-04-01 00-16-11

And now please look at the same day but I set "min" prop to
min={new Date(2019, 2, 31, 10, 0, 0)}

Screenshot from 2019-04-01 00-14-25

What is wrong:
Time scale is shifted back by one hour - 10 is set in "min" prop, but actual min value is 9 as you can see at screenshot.
Event that starts at 13:00 is displayed opposite 12:00 on time scale

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions