react-toolbox/components/time_picker
Javi Velasco 211d542b7f Add animated auto transition from hours to minutes in TimePicker 2015-12-12 11:35:31 +01:00
..
Clock.jsx Add animated auto transition from hours to minutes in TimePicker 2015-12-12 11:35:31 +01:00
ClockFace.jsx Reorganize pickers 2015-11-22 22:13:27 +01:00
ClockHand.jsx Reorganize pickers 2015-11-22 22:13:27 +01:00
ClockHours.jsx Reorganize pickers 2015-11-22 22:13:27 +01:00
ClockMinutes.jsx Reorganize pickers 2015-11-22 22:13:27 +01:00
TimePicker.jsx New interface for onChange event (value, event) 2015-11-25 17:40:14 +07:00
TimePickerDialog.jsx Add animated auto transition from hours to minutes in TimePicker 2015-12-12 11:35:31 +01:00
_config.scss Reorganize pickers 2015-11-22 22:13:27 +01:00
index.js Remove jsx extension from imports in components 2015-11-28 20:24:46 +01:00
readme.md Fix timepicker example 2015-12-03 00:56:18 +01:00
style.clock.scss Add animated auto transition from hours to minutes in TimePicker 2015-12-12 11:35:31 +01:00
style.scss Add animated auto transition from hours to minutes in TimePicker 2015-12-12 11:35:31 +01:00

readme.md

Time Picker

A dialog picker is used to select a single time (hours:minutes). The selected time is indicated by the filled circle at the end of the clock hand.

import TimePicker from 'react-toolbox/lib/time_picker';
let time = new Date();
time.setHours(17);
time.setMinutes(28);

class TimePickerTest extends React.Component {
	state = {time};

  handleChange = (time) => {
  	this.setState({time});
  };

  render () {
  	return <TimePicker label='Finishing time' onChange={this.handleChange} value={this.state.time} />;
  }
}

Properties

Name Type Default Description
className String '' Sets a class to give customized styles.
format String 24hr Format to display the clock. It can be 24hr or ampm.
label String The text string to use for the floating label element in the input component.
onChange Function Callback called when the picker value is changed.
value Date Datetime object with currrently selected time