react-timezone-select

🌐 An extremely usable and dynamic React timezone selector

MIT License

Downloads
223.3K
Stars
204
Committers
14

Bot releases are hidden (Show)

react-timezone-select - v0.9.3

Published by ndom91 about 4 years ago

Update value passed to react-select onChange to only the timezone identifier (i.e. 'Europe/Berlin') instead of the whole object, in order to avoid inconsistencies between values saved during DST / non-DST.

react-timezone-select - v0.9.2

Published by ndom91 about 4 years ago

Minor update to 0.9.1. Fixed some typos and other inconsistencies.

https://www.npmjs.com/package/react-timezone-select

react-timezone-select - v0.9.1

Published by ndom91 about 4 years ago

Now with more label styles!

The return value of onChange returns additional information on the timezone - sourced from spacetime-informal, including the local 3-4 character abbreviation and alternative name.

i.e.

{
  value: 'America/Detroit'
  label: '(GMT-4:00) Eastern Time'
  name: 'Eastern Daylight Time'
  abbrev: 'EDT'
}

These can also be appended to the select options by using the new labelStyle prop. It accepts one of three strings (original | altName | abbrev). See the README for examples of the dropdown styles.

react-timezone-select - v0.8.3 - now in a much smaller bundle!

Published by ndom91 over 4 years ago

Refactored the function to create / generate the timezone options and took that opportunity to swap out the notoriously heavy moment.js for the relatively unknown but competent competitor spacetime. DST is still taken into account when generating each timezones select option.

Bundlesize went from ~127kb to ~42kb(!!)