
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
react-timezone-picker
Advanced tools
This is a React component for selecting a timezone. The implementation is one file, it can be styled, and it has no dependencies.
npm install react-timezone-picker
yarn add react-timezone-picker
import React from 'react';
import TimezonePicker from 'react-timezone-picker';
const MyComponent() => {
return (
<TimezonePicker onChange={console.log} />
)
})
import React from 'react';
import TimezonePicker from 'react-timezone-picker';
const MyComponent() => {
return (
<TimezonePicker
onChange={console.log}
defaultValue={'America/New_York'}
unselectLabel="No Timezone"
style={{
borderRadius: '0.5rem',
background: 'teal',
color: 'white',
}}
/>
)
})
Customize timezone picker by passing these, or any other props valid on the <select />
element, to the component:
Prop | Description |
---|---|
onChange | initial open state of the modal |
defaultValue | the value the timezone picker is initially set to |
value | pass a value into the picker making it a controlled component |
unselectLabel | the label for selecting undefined (the undefined option does not appear without a label specified) |
style | styles for the element |
See the examples and the examples source code for more snippets to copy.
If there are any examples you'd like to see or use cases I didn't cover, please file an issue.
FAQs
React Timezone Picker
The npm package react-timezone-picker receives a total of 41 weekly downloads. As such, react-timezone-picker popularity was classified as not popular.
We found that react-timezone-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.