Socket
Socket
Sign inDemoInstall

react-input-time

Package Overview
Dependencies
8
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-input-time

A simple, yet customizable, React component for time selection.


Version published
Weekly downloads
87
increased by123.08%
Maintainers
1
Install size
155 kB
Created
Weekly downloads
 

Readme

Source

react-input-time

npm build Coverage Status

A simple, yet customizable, React component for time selection.

Install

Requires React 16.8 or later

npm install --save react-input-time

or

yarn add react-input-time

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import TimeInput from 'react-input-time';

const App = () => (
  <TimeInput
    className="input-time"
    initialTime="13:37"
    onChange={(event) => {}}
  />
);

ReactDOM.render(<App />, document.querySelector('.app'));

Options

  • initialTime: The initial time value, required.
  • input: A custom <input> element to use instead of the default one.
  • onChange: onChange handler, will be passed a complete SyntheticEvent object.

All other props will be passed straight through to the rendered DOM element.

Acknowledgments

Originally based on logic from https://github.com/dima-bu/react-time-input, but heavily stripped down.

FAQs

Last updated on 06 Feb 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc