This is a date picker widget, built using reflex and reflex-dom.
datePickerSimple
:: MonadWidget t m
=> DateInputConfig t
-> m (DateInput t)
datePickerWrappedWith
:: MonadWidget t m
=> Wrap DatePickerW t m -- ^ Wrap the whole widget
-> Wrap ControlW t m -- ^ Wrap the controls - 'TextInput' and both buttons
-> Wrap MonthBtnW t m -- ^ Wrap the month buttons
-> Wrap DayW t m -- ^ Wrap the individual 'Day' elements
-> Wrap DayListW t m -- ^ Wrap the list of 'Day' elements
-> DateInputConfig t -- ^ Configuration
-> m (DateInput t)
The datepicker modules provide three primary pieces of the underlying widget:
- Core : The core update logic of the datepicker, including parsing and moving to the next or previous month.
- Controls : The input controls for a datepicker, two buttons to move forward and backward, as well as the embedded
TextInput
specialised for aDay
type. - DaySelect : Display a list of
Day
values and provide anEvent
when one of them is clicked.
There is a simple example page included with this package.
To build when on NixOS:
$ nix-build examples.nix
When in a ./try-reflex
shell from reflex-platform:
$ cabal new-build
The normal cabal build
should work as well, when in the try-reflex
shell.