Skip to content

Min/max date comparison is apparently not timezone-safe #91

@oliversalzburg

Description

@oliversalzburg

Nice to see this project is still being maintained so many years later :D

One of our users is in GMT-8 and was handling GMT+2 dates in the calendar. Due to the comparison being done in https://github.com/beenote/angular-material-datetimepicker/blob/gh-pages/js/angular-material-datetimepicker.js#L454-L486 this resulted in not all expected dates be shown on the calendar.

I can produce a minimal example if it is necessary, but I noticed something about the quoted code section. Why is it not just using moment().isAfter()? This should be much safer as time zones should probably be correctly respected in that method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions