React-native-calendars: Set timezone for calendar

Created on 25 Jul 2017  路  9Comments  路  Source: wix/react-native-calendars

I would like to set timeZone for the calendar component and i want to display it based on their timezone format.

How to do that?

Feature request

Most helpful comment

hardCoding values will help you to show the currentDate but onDayPress of date it's giving me date based on localTimeZone which is not use full in my case.

what i am expecting is set timeZone: 'America/Los_Angeles', onDayPress Get me the date and time based on timeZone which i have set.

All 9 comments

Hi, currently there is not time zone parameter, but you can set monthFormat, localize month/weekday names and set first day of the week manually.

Thanks for the quick reply.

_I have different use case._

_1. i want force calendar component to use specific timeZone instead of local timeZone._

what do you need the timeZone for? Since we are not dealing with times but only with dates?

My app is for particular region(United States).

My Use case is if he is in other country also it should take US date.

@AshokICreate you should be able to just hardcode that date format in instead of depending on the user's local time/date.

hardCoding values will help you to show the currentDate but onDayPress of date it's giving me date based on localTimeZone which is not use full in my case.

what i am expecting is set timeZone: 'America/Los_Angeles', onDayPress Get me the date and time based on timeZone which i have set.

onDayPress is giving selected day info. If you are talking about timestamp property - it is UTC timestamp representing the day selected. Could you elaborate why do you need to set timezone? What is the exact usecase?

I also want to set TimeZone on calendar Agenda component. How I do that?

@ashokrse2020 did you find a solution ? I have the same issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

idlework picture idlework  路  4Comments

microwin168 picture microwin168  路  4Comments

filippoitaliano picture filippoitaliano  路  3Comments

anishtr4 picture anishtr4  路  3Comments

chapeljuice picture chapeljuice  路  3Comments