All settings and configuration utilities for both pickers.
A record of default settings for the date picker. Extend this if you want to further customize the date picker.
Requires a Zone to inform the picker in which time zone it should
display the selected duration as well as a msg that expects a tuple containing
a datepicker instance and a Maybe tuple representing a selected duration.
( DatePicker, Maybe ( Posix, Posix ) ) -> msgSet the visibility of the timepicker in the DateTimePicker
NeverVisible - The time picker is never visible. Please note that
while ostensibly picking a day, a selection still returns a Posix
representing the beginning of that day (00:00). It is up to you to
process the selection accordingly if you wish to treat it as a whole day.
Toggleable - The time picker visibility can be toggled but
is by default closed when the datetime picker is opened. Additional
configuration can be achieved via TimePickerSettings.
AlwaysVisible - The time picker is always visible. This is the default setting
as it most explicitly shows that the datetime picker is indeed picking both
a date and time, not simply a date. Additional configuration can be achieved
via TimePickerSettings.
The type facilitating the configuration of the timepicker settings.
timeStringFn - a function that returns a string representation of the selected time of day
Because it could be the case that a picker is being used in a different
timezone than the home timezone of the implementor, the allowedTimesofDay
function ingests a Zone in addition to a Posix. The
Zone represents the time zone in which the picker is being used. An
implementor can leverage this to compare against a base time zone when
enforcing allowable times of day, etc. You SHOULD assume that the Posix
passed into these functions is floored to the start of its respective Day.
More information can be found in the examples.
A record of default settings for the time picker. Extend this if you want to further customize the time picker.
A shared type facilitating the preset variants for both pickers
Set type facilitating the preset dates
title - the displayed name of the preset
date - the Posix the preset will select in the date picker.
Set type facilitating the preset date ranges
title - the displayed name of the preset
range - the time range the date range picker will select, consisting of
a start-Posix and an end-Posix.
Transforms a Posix into a PickerDay based on the Settings
Extracts the TimePickerSettings from the Settings
Determines whether the time picker is visible based on the TimePickerVisibility.
Determines if a selected date matches a given preset
Determines if a selected date range matches a given preset range
The type facilitating the configuration of the datepicker settings.
id- provides a custom id to the picker elementzone- theZonein which the date picker is being used (client zone)formattedDay- a function that returns a string representation for the provided day of the weekformattedMonth- a function that returns a string representation for the provided monthisDayDisabled- a function that determines if the combinedPosixandZonerepresent a day that should be disabled in the pickerfocusedDate- aPosixthat represents a day that should be highlighted on the picker (i.e. the current day)dateStringFn- a function that returns a string representation of the selected daytimePickerVisibility- see belowshowCalendarWeekNumbers- wheather to display or not display caldendar week numberspresets- a list ofPresets, for selectable, preconfigured datestheme- a record of customizable design tokensMore information can be found in the examples.