Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-timezone-select

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timezone-select

Usable, dynamic React Timezone Select

  • 0.7.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
57K
increased by2.24%
Maintainers
1
Weekly downloads
 
Created
Source

🌐⌚ react-timezone-select

NPM Downloads npm GitHub issues NPM

Another react timezone select component, I know.. However this one has a few key benefits!

While looking around for a good one, I had trouble finding a timezone select components which:

1) Adjusted the choices with Daylight Savings Time (DST)
2) Didn't have a huge list of choices to scroll through when technically only 24 (ish) are necessary.

Demo: ndom91.github.io/react-timezone-select/

🏗️ Installing

npm install react-timezone-select

🔭 Usage

import React, { useState } from 'react'
import ReactDOM from 'react-dom'
import TimezoneSelect from 'react-timezone-select'

const App = () => {
  const [selectedTimezone, setSelectedTimezone] = useState({})

  return (
    <div className='App'>
      <h2>react-timezone-select</h2>
      <quote>Please make a selection</quote>
      <div className='select-wrapper'>
        <TimezoneSelect value={selectedTimezone} onChange={tz => setSelectedTimezone(tz)} />
      </div>
      <h3>Output:</h3>
      <div className='code'>
        <span style={{ fontWeight: '500' }}>selectedTimezone: {'{'}</span>{' '}
        <br />
        <span style={{ marginLeft: '20px', fontWeight: '500' }}>
          value: '{selectedTimezone.value}'
        </span>
        <br />
        <span style={{ marginLeft: '20px', fontWeight: '500' }}>
          label: '{selectedTimezone.label}'
        </span>
        <br />
        {'}'}
      </div>
    </div>
  )
}

const rootElement = document.getElementById('root')
ReactDOM.render(<App />, rootElement)

🖥️ Example

Demo: ndom91.github.io/react-timezone-select/

Theres a small example page / implementation available in the ./examples directory, simply run npm start after installing everything and webpack dev server should begin, where you will be able to find the demo at localhost:3001

Screenshot 1

Screenshot 3

🚧 Contributing

Pull requests are always welcome!

🙏 Thanks

Keywords

FAQs

Package last updated on 11 Jul 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc