The focus here is on src/widgets/ot_calendar.eliom and src/widgets/ot_calendar.eliomi files.
Main visible changes
Possibility to change the month via a selector
Possibility to change the year via a selector as well
When there is a period restriction the days that are not in the period are displayed differently and are not clickable anymore.
Internal changes
Period restriction type added in order to have a customizable calendar.
Refactoring of the way the handlers were written in the file in order to avoid redundancies
Selectors added for months and years
Handlers added for months and years thanks to the (very) helpful React module.
Test
In order to be able to test the changes, a very simple way to do is :
Clone this repository on your computer and pin (via opam : opam pin add --kind path "your_path_to_this_repository") the repository as the new ocaml-toolkit library
Download the ocsigen-start (via : eliom-distillery -name ocstart -template os.pgocaml) repository since it has a calendar demonstration
Reinstall the ocaml-toolkit (still via opam : opam reinstall ocaml-toolkit)
The only thing left to do is to execute the program inside the ocsigen-start repository and see the changes in your favorite browser.
Can you change the opam file to increment version number?
If current version is x.y.z
change x if you break compatibility
change y otherwise (new feature ...)
The focus here is on
src/widgets/ot_calendar.eliom
andsrc/widgets/ot_calendar.eliomi
files.Main visible changes
Internal changes
React
module.Test
In order to be able to test the changes, a very simple way to do is :
ocaml-toolkit
libraryocsigen-start
(via : eliom-distillery -name ocstart -template os.pgocaml) repository since it has a calendar demonstrationocaml-toolkit
(still via opam : opam reinstall ocaml-toolkit)ocsigen-start
repository and see the changes in your favorite browser.