You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across a bug that after typing in a date, the picker selects a day that is off by one (returned timestamp is off by the timezone offset).
The cause is that the Date.parse / new Date parameter does not consider this.useUtc flag. Thus the parser creates a timestamp which is off by the local timezone offset (and that lands to a different day). I tested appending this (to the parameters given in parseTypedDate): + (this.useUtc ? ' UTC' : ''). The picker then showed the correct day after typing in the date. Such solution seems somewhat hackish though so I didn't want to create pull request out of it. Any ideas how to do a more clean solution than appending UTC timezone identifier into the string?
There are multiple open issues which seem to be similar but I couldn't find any that provided 100% match to the problem I'm seeing so I opened new one focused on the particular problem I located.
The text was updated successfully, but these errors were encountered:
The PRs #536 or #653 might be used to workaround this problem but it's a bit heavy-handed solution to force creating the parsing function manually to avoid the bug in the useUtc flag.
I came across a bug that after typing in a date, the picker selects a day that is off by one (returned timestamp is off by the timezone offset).
The cause is that the
Date.parse
/new Date
parameter does not considerthis.useUtc
flag. Thus the parser creates a timestamp which is off by the local timezone offset (and that lands to a different day). I tested appending this (to the parameters given inparseTypedDate
):+ (this.useUtc ? ' UTC' : '')
. The picker then showed the correct day after typing in the date. Such solution seems somewhat hackish though so I didn't want to create pull request out of it. Any ideas how to do a more clean solution than appending UTC timezone identifier into the string?There are multiple open issues which seem to be similar but I couldn't find any that provided 100% match to the problem I'm seeing so I opened new one focused on the particular problem I located.
The text was updated successfully, but these errors were encountered: