Prevent dates from being adjusted by a User's timezones
See original GitHub issueWhen a date is passed as 2018-01-01
to the component as a string via the value
prop, it gets converted to a JavaScript Date object.
The user’s timezone reflects during this conversion.
A user in New York will see 2017-12-31
on his datepicker component rather than 2018-01-01
because GMT-4
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to ignore user's time zone and force Date() use specific ...
To account for milliseconds and the user's time zone, use the following: ... //re-initialize the Date function to reverse the timezone adjustment var...
Read more >Allow or Prevent Users to Change Time Zone in Windows 10
To Prevent Users or Groups from Changing the Time Zone Windows 10, ; Local Security Policy will open. Go to User Local Policies...
Read more >Ignore User's Time Zone on Certain Date Fields - IdeaExchange
We would like the ability to turn off User Time Zone adjusting when creating Date Fields. For example: you are in Pacific Time...
Read more >Working with dates and timezones in JavaScript - Ursa Health
A helpful primer for working with dates and timezones in Javascript. ... as you're trying to get times working sensibly for all your...
Read more >A Wrinkle in Time Keeping - The New York Times
If you do not want to stop your phone's calendar from adjusting itself, take an alternative approach. When you schedule a meeting to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh, nice! It’s been open for a few months now @charliekassel … It would be really helpful if it’s merged.
@charliekassel In my use case, I am binding the value to the datepicker component from a PHP blade template, not using it within another vue component where I’d be able to manipulate a date before passing it as a prop, so I have to use a string.
One way to get around this is to convert the date-string to reflect the user’s timezone, basically suffix it with
00:00:00 GMT-4
However, a prop that tells the datepicker to ignore the time part of the date (or lack thereof) would be helpful.
If it’s a datepicker, it makes sense that it should be able to be concerned with just dates and not their time values.