1.0.15 • Published 6 years ago

material-ui-next-datepicker v1.0.15

Weekly downloads
8
License
ISC
Repository
-
Last release
6 years ago

Material UI Next Datepicker

Description

This repository act as a sample of creating a datepicker in Material UI Next or it can be imported as a datepicker component.

Prerequisite

npm install material-ui-next-datepicker --save

Screenshot

Image of Material UI Clockpicker

Options

name: string
value: Date
onChange: (value:Date) => void
label?: string
error?: string
min?: Date
max?: Date
fullWidth?: boolean
dialog?: boolean

Basic setup

  1. Make sure you installed Material UI Next.
  2. Install this package via npm.
  3. Import this package and use like the following:
import DateFormatInput from 'material-ui-next-datepicker'

class YourComponent extends React.Component<{}, YourComponentState> {
  onChange = (date:Date) => {
    console.log(date)
    this.setState({date})
  } 
  render() {
    const {date} = this.state
    return (
      <div>
        <DateFormatInput name='date-input' value={date} onChange={this.onChange}/>
      </div>
    )
  } 
}
interface YourComponentState {
  date: Date
}
1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago