Coder Social home page Coder Social logo

gustavobg / material-ui-time-picker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teamwertarbyte/material-ui-time-picker

0.0 1.0 0.0 1.45 MB

A time picker for material-ui 1.0.0-beta.

Home Page: https://next.mui.wertarbyte.com/#material-ui-time-picker

License: MIT License

JavaScript 99.71% HTML 0.29%

material-ui-time-picker's Introduction

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.
defaultValue Date The initial value of the time picker.
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.
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.

material-ui-time-picker's People

Contributors

lemaik avatar

Watchers

James Cloos 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.