A date picker component for picking a datetime range.
Instantiates and returns a date picker.
The date picker view. Simply pass it the configured settings and the date picker instance you wish to view.
Events external to the picker to which it is subscribed.
The type facilitating the configuration of the datepicker settings.
internalMsg - a function that returns a msg for the calling module to handle picker updates
zone - the Zone in which the date picker is being used (client zone)
formattedDay - a function that returns a string representation for the provided day of the week
formattedMonth - a function that returns a string representation for the provided month
isDayDisabled - a function that determines if the combined Posix and Zone represent a day that should be disabled in the picker
focusedDate - a Posix that 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 day
timePickerVisibility - see below
More information can be found in the examples.
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 ) ) -> msgTimePickerVisibility(..) does not have any docs. The module's documentation names it in an @docs line, but the package does not expose it.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.
Open the provided date picker and receive the updated picker instance. Also takes a default time the picker should center on (in the event a time has not yet been picked) as well as the picked start and end times. A common example of a default time would be the datetime for the current day.
Close the provided date picker and receive the updated picker instance.
Indicates whether the DatePicker is open
The opaque type representing a particular date picker instance.