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

react-timepicker

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timepicker

React timepicker in Android KitKat style

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
263
increased by10.97%
Maintainers
1
Weekly downloads
 
Created
Source

npm

react-timepicker

Timepicker is a React timepicker component that looks like Android KitKat one.

Example

Timepicker

Install

From npm

npm install react-timepicker --save

Quick Start

'use strict';

import React      from 'react';
import ReactDOM   from 'react-dom';
import Timepicker from 'react-timepicker';

// Remember to include timepicker.css

class TimepickerExample extends React.Component {
    onChange (hours, minutes) {
        // ...
    },

    render () {
        return (
            <Timepicker onChange={this.onChange} />
        );
    }
}

ReactDOM.render(<TimepickerExample />, document.getElementById('timepicker-example'));

Prop Values

mode

React.PropTypes.bool

Initial mode - Timepicker.HOURS or Timepicker.MINUTES (default: Timepicker.HOURS).

size

React.PropTypes.number

Clock size in pixels (default: 300).

radius

React.PropTypes.number

Clock radius in pixels (default: 125).

hours

React.PropTypes.number

Initial hours (default: 0).

minutes

React.PropTypes.number

Initial minutes (default: 0).

formatNumber

React.PropTypes.func.isRequired

Function (number, 'info' | 'clock') => string formatting numbers (default: left pad with 0)

militaryTime

React.PropTypes.bool

Military (24-hour) time switch (default: true).

onChange

React.PropTypes.func

Callback function when a hour or a minute is changed. Passes 2 parameters: new hours and minutes.

onChangeMode

React.PropTypes.func

Callback function when mode is changed. Passes 1 parameter: new mode.

Keywords

FAQs

Package last updated on 19 Oct 2017

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