A date picker component for a single datetime.
Internal Msg's to update the picker.
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.
Update the SingleDatePicker according to the given internal msg.
Returns the updated picker and the currently selected datetime, if available.
Events external to the picker to which it is subscribed.
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 time. 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.
Open the provided date picker outside the DOM hierarchy. Uses the openPicker function and additionally takes an id of the trigger DOM element (e.g. a button) to manually attach the picker's position to it. Returns the updated picker instance plus the necessary command in order to find DOM elements and their positions.
Returns the command to update the trigger & picker DOM elements' instances. Is used internally but can also be used externally in case of a changing viewport (e.g. onScroll or onResize).
Indicates whether the DatePicker is open
The opaque type representing a particular date picker instance.