• Stars
    star
    127
  • Rank 282,739 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A time picker for Material-UI.

material-ui-time-picker

npm Package Build Status Coverage Status

This project provides a time picker for Material-UI.

Demo

Installation

npm i --save material-ui-time-picker

Usage

There are multiple ways to use this component to allow greater flexibility. This is the most basic usage that behaves similar to the Material-UI 0.x time picker:

import TimeInput from 'material-ui-time-picker'

// uncontrolled input
<TimeInput
  mode='12h'
  onChange={(time) => this.handleChange(time)}
/>

// controlled input
<TimeInput
  mode='12h'
  value={this.state.time}
  onChange={(time) => this.handleChange(time)}
/>

For detailed documentation, take a look into the styleguide. The source code, especially the tests, might also be helpful.

TimeInput Properties

Name Type Default Description
autoOk bool false If true, automatically accept and close the picker on set minutes.
cancelLabel string 'Cancel' Override the label of the cancel button.
ClockProps object Properties to pass down to the Clock component.
defaultValue Date This default value overrides initialTime and placeholder.
initialTime Date The default value for the time picker.
inputComponent elementType Input The component used for the input. Either a string to use a DOM element or a component.
placeholder string The placeholder value for the time picker before a time has been selected.
mode enum: '12h' '24h' '12h' Sets the clock mode, 12-hour or 24-hour clocks are supported.
okLabel string 'Ok' Override the label of the ok button.
onChange func Callback that is called with the new date (as Date instance) when the value is changed.
openOnMount bool If true, automatically opens the dialog when the component is mounted.
TimePickerProps object Properties to pass down to the TimePicker component.
value Date The value of the time picker, for use in controlled mode.

Note: TimeInput behaves like Material-UI's Input component and can be used inside FormControls.

License

The files included in this repository are licensed under the MIT license.

More Repositories

1

material-ui-chip-input

A chip input field using Material-UI.
JavaScript
739
star
2

material-auto-rotating-carousel

Introduce users to your app with this Material-style carousel.
JavaScript
431
star
3

mdi-material-ui

Material-UI SvgIcon components for Material Design Icons.
JavaScript
328
star
4

material-ui-search-bar

Material design search bar
JavaScript
260
star
5

material-ui-image

Material style image with loading animation
JavaScript
214
star
6

material-ui-rating

Rate something with style.
JavaScript
88
star
7

material-ui-snackbar-provider

A convenient way to use material-ui's snackbars.
JavaScript
81
star
8

material-ui-password-field

A password field using Material-UI.
JavaScript
58
star
9

material-ui-fullscreen-dialog

A fullscreen dialog for Material-UI.
JavaScript
58
star
10

electron-react-material-ui

Quick boilerplate for an electron react app with material ui
JavaScript
37
star
11

material-ui-toggle-icon

An animated toggle icon for Material-UI.
JavaScript
35
star
12

crypto-trading-bot

A trading bot that does what you order him to do (use at your own risk)
TypeScript
30
star
13

material-ui-bottom-sheet

Bottom sheets slide up from the bottom of the screen to reveal more content.
JavaScript
29
star
14

codify

TypeScript
17
star
15

material-ui-feature-discovery-prompt

Provide value and encourage return visits by introducing users to new features and functionality at contextually relevant moments.
JavaScript
17
star
16

material-ui-settings-panel

A settings component in material ui style inspired by google admin console and google inbox.
JavaScript
16
star
17

material-ui-dots

Just some animated dots for pagination.
JavaScript
14
star
18

material-ui-file-dropzone

File selection components with drag'n'drop support for Material-UI.
JavaScript
11
star
19

react-hero-animation

A small react library for hero animations.
JavaScript
8
star
20

react-props-md-table

A markdown table generator for React component props.
JavaScript
6
star
21

material-ui-share

Material design web share component
JavaScript
5
star
22

materialdesign-webfont-material-ui

FontIcon components for Material Design Icons font icons.
JavaScript
4
star
23

mctext-react

A React component to display Minecraft-formatted text.
JavaScript
4
star
24

mui-styleguidist-wrapper

A wrapper of react-styleguidist for Material-UI components.
JavaScript
3
star
25

soundcloud-searcher

Search soundcloud tracks by name. Filter by genre
JavaScript
2
star
26

module-loader

High Cohesion, Loose Coupling with ease
JavaScript
2
star
27

McTextBlock

A WPF component for rendering Minecraft formatted text.
C#
1
star