react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

Can't set time zone problem

Open OPEN-9 opened this issue 2 years ago • 2 comments

The user base is global, and the calendar selector has no time zone, making it difficult to distinguish between the dates the user currently selects

image

OPEN-9 avatar Aug 17 '22 14:08 OPEN-9

<Calendar timezone="Asia/Shanghai" />

Your support for this feature is highly required

OPEN-9 avatar Aug 17 '22 14:08 OPEN-9

Definitely need this feature .

1mehdifaraji avatar Sep 08 '22 15:09 1mehdifaraji

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 11 '22 09:12 stale[bot]

Hope this helps someone:

 onDayPress={day => {
            const offsetInMiliseconds = new Date().getTimezoneOffset() * 60 * 1000; // Get timezone offset
            const currentDateWithTimezoneApplied = day.timestamp + offsetInMilliseconds
            // Do stuff
          }}

charlestbell avatar Feb 22 '23 18:02 charlestbell