simple-react-datepicker

0.0.7 • Public • Published

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.

スクリーンショット

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.

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.

Package Sidebar

Install

npm i simple-react-datepicker

Weekly Downloads

0

Version

0.0.7

License

MIT

Last publish

Collaborators

  • yako