Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Ability to set timezone #1010

Closed
Eric24 opened this issue Apr 14, 2020 · 4 comments
Closed

Ability to set timezone #1010

Eric24 opened this issue Apr 14, 2020 · 4 comments
Labels
new feature Proposal Request for comments
Milestone

Comments

@Eric24
Copy link

Eric24 commented Apr 14, 2020

Is your feature request related to a problem? Please describe.
There does not appear to be a way to specify the timezone reference used by the component (i.e. it uses only the browser's timezone). This is not always correct, as there are times when an application or even a specific date field needs to be displayed in a specific timezone.

Describe the solution you'd like
A way to override the default timezone with a specific timezone.

Describe alternatives you've considered
Our current solution is to manipulate the input value, adding an offset value to make the component's default timezone match that of the desired timezone, and then do the same on the way out. It's definitely a hack.

@gpbl gpbl added this to the v8.0.0 milestone Apr 17, 2020
@gpbl
Copy link
Owner

gpbl commented Apr 17, 2020

@Eric24 thanks for your suggestion! This should go in the next major release. Do you think a timezone prop would work?

@Eric24
Copy link
Author

Eric24 commented Apr 17, 2020

Yes, timezone would certainly make sense as a prop; the other option is tz, which is pretty common.

By default, the component would work as it does now (using the browser's timezone), but if defined, it just uses the prop value to explicitly set the timezone of the passed-in date value.

@gpbl gpbl modified the milestones: v8.0.0-alpha, v8.1 Apr 20, 2020
@gpbl gpbl changed the title Ability to set timezone used by react-day-picker Ability to set timezone Apr 27, 2020
@m-nathani
Copy link

m-nathani commented Sep 25, 2020

hey guys i badly need this.. is there any update for this ? . or do you have part-time of solution how to fix it ?

@m-nathani
Copy link

or do you guys know whats the timeline for this ? if thats far i can replace it with a datepicker with supports timezone for now.

@gpbl gpbl closed this as completed Feb 10, 2021
Repository owner locked and limited conversation to collaborators Feb 10, 2021
@gpbl gpbl modified the milestones: v8.1.0, v8.0.0 Feb 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
new feature Proposal Request for comments
Projects
Status: Done
Development

No branches or pull requests

3 participants