Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bs-react-dates

ahrefs27MITdeprecated3.0.0

this package has been deprecated in favor of @ahrefs/bs-react-dates

Reason bindings for react-dates

react, reason-react, reason, reasonml, bucklescript, datepicker, react-dates

readme

Reason bindings for react-dates

Reason bindings for react-dates.

Status

🚧 Not everything is supported yet. 🚧

Feel free to create an issue or PR.

Installation

npm install --save bs-react-dates

Then add bs-react-dates to bs-dependencies in your bsconfig.json:

{
  ...
  "bs-dependencies": ["bs-react-dates"]
}

To include styles

[%bs.raw {|require('react-dates/lib/css/_datepicker.css')|}];

react-dates assumes that box-sizing: border-box is set globally in your page's CSS. At least do this, to make it display properly.

.DateRangePicker *,
.SingleDatePicker *,
.DayPickerRangeController * {
  box-sizing: border-box;
}

TODO

Usage

Please take a look at examples. To run demo:

$ cd examples
$ npm install
$ npm start

changelog

3.0.0 (Apr 11, 2018)

  • callbacks receive and returns records/bools this gets converted to JS values(objects/Js.boolean) under the hood

2.0.1 (Apr 10, 2018)

  • add note about box-sizing to readme
  • fix styles in example

2.0.0 (Apr 9, 2018)

  • startDate/endDate are optional
  • add nullableFocusedInputToJs

1.0.0 (Apr 6, 2018)

  • First release