Git Product home page Git Product logo

time-picker's Introduction

TimePicker

React TimePicker

NPM version build status Test coverage gemnasium deps node version npm download

example

http://react-component.github.io/time-picker/

install

npm install rc-time-picker

Usage

import TimePicker from 'rc-time-picker';
import ReactDOM from 'react-dom';
ReactDOM.render(<TimePicker />, container);

API

TimePicker

Name Type Default Description
prefixCls String 'rc-time-picker' prefixCls of this component
clearText String 'clear' clear tooltip of icon
disabled Boolean false whether picker is disabled
allowEmpty Boolean true allow clearing text
open Boolean false current open state of picker. controlled prop
defaultValue moment null default initial value
defaultOpenValue moment moment() default open panel value, used to set utcOffset,locale if value/defaultValue absent
value moment null current value
placeholder String '' time input's placeholder
className String '' time picker className
popupClassName String '' time panel className
showHour Boolean true whether show hour
showMinute Boolean true whether show minute
showSecond Boolean true whether show second
format String - moment format
disabledHours Function - disabled hour options
disabledMinutes Function - disabled minute options
disabledSeconds Function - disabled second options
use12Hours Boolean false 12 hours display mode
hideDisabledOptions Boolean false whether hide disabled options
onChange Function null called when select a different value
addon Function - called from timepicker panel to render some addon to its bottom, like an OK button. Receives panel instance as parameter, to be able to close it like panel.close().
placement String bottomLeft one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight']
transitionName String ''
name String - sets the name of the generated input
onOpen Function({ open }) when TimePicker panel is opened
onClose Function({ open }) when TimePicker panel is opened
hourStep Number 1 interval between hours in picker
minuteStep Number 1 interval between minutes in picker
secondStep Number 1 interval between seconds in picker
focusOnOpen Boolean false automatically focus the input when the picker opens
inputReadOnly Boolean false set input to read only

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-time-picker is released under the MIT license.

time-picker's People

Contributors

abyr avatar adam187 avatar afc163 avatar artemv avatar benjycui avatar csenk avatar fehnomenal avatar iceman1212 avatar jesperwe avatar levilansing avatar marekpiechut avatar paranoidjk avatar plandem avatar santanm avatar shaleynikov avatar shoaibbhimani avatar sinory avatar vahnag avatar wuzhao avatar yesmeck avatar yiminghe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.