# material-ui-custom-datepicker

> material-ui datepicker connected with textfield

Latest version **1.0.33** (published 2018-09-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install material-ui-custom-datepicker
pnpm add material-ui-custom-datepicker
yarn add material-ui-custom-datepicker
bun add material-ui-custom-datepicker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.33 |
| Published | 2018-09-20 |
| First published | 2017-10-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 210.7 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | MM |
| Maintainers | lalala_ |

## Links

- npm: https://www.npmjs.com/package/material-ui-custom-datepicker
- Repository: https://github.com/MaximMatsuk/material-ui-custom-datepicker
- Homepage: https://github.com/MaximMatsuk/material-ui-custom-datepicker#readme
- Issues: https://github.com/MaximMatsuk/material-ui-custom-datepicker/issues
- npm.io page: https://npm.io/package/material-ui-custom-datepicker

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) 2.22.2
- [material-ui](https://npm.io/package/material-ui.md) 0.20.0
- [react-input-mask](https://npm.io/package/react-input-mask.md) 2.0.4

## Recent versions

- 1.0.33 (latest) — 2018-09-20
- 1.0.32 — 2018-07-24
- 1.0.31 — 2018-07-24
- 1.0.30 — 2018-07-24
- 1.0.29 — 2018-05-18
- 1.0.28 — 2018-02-14
- 1.0.27 — 2018-01-12
- 1.0.26 — 2017-12-07
- 1.0.25 — 2017-11-01
- 1.0.24 — 2017-11-01
- 1.0.23 — 2017-11-01
- 1.0.22 — 2017-10-31
- 1.0.21 — 2017-10-31
- 1.0.20 — 2017-10-31
- 1.0.19 — 2017-10-31
- … 18 more at https://npm.io/package/material-ui-custom-datepicker/versions

## README

# material-ui-custom-datepicker

Custom DatePicker component, that includes connected material-ui DatePicker and TextField components.
react-input-mask is used for cutting useless symbols. There is common presence, max value, min value and date format validation.

### Installing

```
npm install material-ui-custom-datepicker
```

### Usage

```
import React from "react";
import {DatePicker} from "material-ui-custom-datepicker";


class myDatePicker extends React.Component{
  constructor(props) {
    super(props);
    this.state = {
      value: new Date()
    }
  }  
  
  handleChange = (event, value) => {
    this.setState({value});
  }
    
  render(){
    return (
      <DatePicker
        name="birthDate"
        value={this.state.value}
        onChange={this.handleChange}  
        floatingLabelText="Birthday"
        autoOk
        cancelLabel="Back"
        minDate={new Date(1900, 0, 1)}
        maxDate={new Date(2100, 0, 1)}
      />
    );
  }
}
```

Component support all default DatePicker and TextField material-ui properties. Additional ones are:
* invalidDateError - invalid date format error
* maxDateError - "too late date" error
* minDateError - "too early date" error
* dateInputFormat - date format in TextField
* dateValueFormat - date value format
* maskChar - maskChar of react-input-mask
* mask - mask of react-input-mask

In max and min date errors max and min values are inserting instead of "{date}".

---
_Source: https://npm.io/package/material-ui-custom-datepicker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
