Skip to content
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

Support custom timezone #9

Open
SaraPrager opened this issue Jun 3, 2021 · 3 comments
Open

Support custom timezone #9

SaraPrager opened this issue Jun 3, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@SaraPrager
Copy link

SaraPrager commented Jun 3, 2021

Thanks for this helpful library!

It would be nice to add support for custom timezone.

My use case as an example:
I have a UI for monitoring a remote device.
Sometimes the user wants to see the events in the timezone of the device location, which is not his local timezone.

Thanks.

BTW, there is a typo in the source code:
getDayOfWeekNames return range(0, 6).map((month) => format(setDay(date, month), formatStr, { locale: this._dateFnsLocale, }) );
should rename 'month' to 'day'

@sapozhnikovay
Copy link
Owner

sapozhnikovay commented Jun 3, 2021

Hello, Sara,

Thanks for the typo alert ) Should definitely check the source and the tests now.

About the custom timezone case. Do you use the result dates in a some filtering process? Maybe it is more useful to transform the result from the datepicker to the target timezone further in code chain?
Ex: User selects the date (they are shown in his local timezone) and then the actual filter receives the trasformed value. So a user in a GMT+2 zone selects 03-06-2021T:00:00:00Z+02:00 and in the filter goes a GMT-4 zone this is 02-06-2021T18:00:00Z-04:00

Or maybe you want something like in #6 but not for the UTC only but for the any Timezone?

Or maybe I misunderstood the use case )

@SaraPrager
Copy link
Author

Hi,
I mean something like useUTC for any timezone.
I should display the calendar itself in any specific timezone.
Thanks

@sapozhnikovay sapozhnikovay added the enhancement New feature or request label Jun 9, 2021
@sapozhnikovay sapozhnikovay self-assigned this Jun 9, 2021
@sapozhnikovay
Copy link
Owner

Okay, Sara. I'll try to add this feature along with the bugfixes for the #11 and #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants