package reason-react-day-picker
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Melange bindings for react-day-picker
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.1.tar.gz
md5=29b0b32a163c27d9874fcaf2425f3b5a
sha512=94d23654757178716fd9377dc1c66e23d5b3bf08b92fe1038e1d692931ce58682d6ac49b4b43fa83d9bc3ae9a9508066eea8eec184d10ca8066d323d84bca972
Description
Melange bindings for react-day-picker written in ReasonML
README
Note
These are the first bindings I made for a React component. Needs improvement. Feedback and suggestions are highly welcome.
Usage
Add as OPAM dependency using pin:
opam pin reason-react-day-picker git+https://github.com/Software-Deployed/reason-react-day-picker
Add reason-react-day-picker to libraries dune stanza:
(libraries
reason-react-day-picker)<DayPicker
mode="range"
selected={`Range({
from: Js.Nullable.return(openDate),
to_: Js.Nullable.return(closeDate),
})}
onSelect={`Range(dates => {
let openDate =
switch (dates.from->Js.Nullable.toOption) {
| Some(date) => date
| None => today
};
let closeDate =
switch (dates.to_->Js.Nullable.toOption) {
| Some(date) => date
| None => openDate
};
updateOpenDate(openDate);
updateCloseDate(closeDate);
})}
/>
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page