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

rc-time-picker

Package Overview
Dependencies
Maintainers
5
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-time-picker

React TimePicker

  • 2.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67K
decreased by-57.22%
Maintainers
5
Weekly downloads
 
Created

What is rc-time-picker?

The rc-time-picker package is a React component for selecting time. It provides a simple and customizable time picker component that can be easily integrated into React applications.

What are rc-time-picker's main functionalities?

Basic Time Picker

This feature allows you to add a basic time picker to your React application. The component is imported and used directly in the JSX.

import React from 'react';
import TimePicker from 'rc-time-picker';
import 'rc-time-picker/assets/index.css';

const App = () => (
  <TimePicker />
);

export default App;

Time Picker with Default Value

This feature allows you to set a default time value for the time picker. The default value is set using the moment.js library.

import React from 'react';
import TimePicker from 'rc-time-picker';
import moment from 'moment';
import 'rc-time-picker/assets/index.css';

const App = () => (
  <TimePicker defaultValue={moment('12:08', 'HH:mm')} />
);

export default App;

Time Picker with 12-Hour Format

This feature allows you to configure the time picker to use a 12-hour format instead of the default 24-hour format.

import React from 'react';
import TimePicker from 'rc-time-picker';
import 'rc-time-picker/assets/index.css';

const App = () => (
  <TimePicker use12Hours />
);

export default App;

Time Picker with Disabled Hours

This feature allows you to disable specific hours in the time picker. In this example, the hours from 0 to 6 are disabled.

import React from 'react';
import TimePicker from 'rc-time-picker';
import 'rc-time-picker/assets/index.css';

const App = () => (
  <TimePicker disabledHours={() => [0, 1, 2, 3, 4, 5, 6]} />
);

export default App;

Other packages similar to rc-time-picker

Keywords

FAQs

Package last updated on 27 May 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