# simple-react-datepicker

```
npm install simple-react-datepicker
```

A datepicker component for the react.js designed to support Japanese date styles. It allows editing and formatting in Japanese friendly styles like the Microsoft Office. Also supports minimum validation and error handling. The basic design is trying to mimic the [Datepicker for Bootstrap](http://eternicode.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox).

![スクリーンショット](https://raw.githubusercontent.com/kyasu1/simple-react-datepicker/master/images/screen_shot.png)

## Features

* Supports following formats for both intput and output. `YYYY-MM-DD`, `YYYY/MM/DD`, `YYYY年/MM月DD日`, `GYY/MM/DD`, `GGGYY年MM月DD日`
* The component accepts and returns DB friendly value, which is 'YYYY-MM-DD'
* Designed to be used with the Flux architecture. The component fires onChange event with an object containing {value, index, accessor, error}. They will be sent to an Action as a payload. The basic idea is take from [here](https://github.com/FormidableLabs/recipes-flux).

## Usages

Please refer to the attached example file. More details will be published later if possible.

## ToDo

* Range specifier to restrict the selectable dates will be better for some use cases.
* Internationalization... Maybe if someone want...
* Support of displaying public holidays and day offs of a company is a neat idea.
* Fix the known bug that not propery displaying the day state when hovering on the selected date.
* Improve CSS design and make it cutomizable...

## Disclaimer

This component is created for my own use and not guaranteeed to be supported or improved further... I am writing this README when I am drunk lol.
