The UI.DatePicker is a component that displays a calendar for the user to pick a date.
DatePicker.singleDatePicker
{ toExternalMsg = Msg.ToDatePicker
, onSelectMsg = Msg.SelectDate
}
model.datePickerModel
model.maybeSelectedDate
|> DatePicker.withTodaysMark appConfig.timeNow
|> DatePicker.renderElement appConfig.renderConfigAllows picking a single date
singleDatePicker
{ toExternalMsg = Msg.ToDatePicker
, onSelectMsg = Msg.SelectDate
}
model.datePickerModel
model.maybeSelectedDateMark today's day with a single blue dot below it.
Limits the days that can be selected to a specific range.
NOTE: This function does not validate/change the current viewing month or selected date.
Show the datapicker.
The Model holding current viewing month and year.
Creates the starting Model. It receives an initial date for focusing its month and year.
NOTE: This does not selects the said date, just start by displaying its month.
Contains a pre-defined datapicker's change.
The
DatePicker msgtype is used for describing the component for later rendering.