lenards/elm-ui-patternfly/4.0.1

NOTE: the latest version is 4.0.2

PF6.DatePicker

PF6 DatePicker component

Renders a calendar month grid. The consumer controls which month is displayed and which date is selected. Navigation (prev/next month) is handled via msgs.

See: https://www.patternfly.org/components/date-picker

Definition

type DatePicker msg

Opaque DatePicker type

type alias Date =
{ year : Int
, month : Int
, day : Int
}

A calendar date

Constructor

{ year : Int
, month : Int
}
-> DatePicker msg

Construct a DatePicker showing the given year and month (1–12)

Selection modifiers

withSelectedDate : Maybe Date -> DatePicker msg -> DatePicker msg

Set the currently selected date

Event modifiers

withOnSelect : (Date -> msg) -> DatePicker msg -> DatePicker msg

Set the message sent when a date is clicked

Set the message sent when the previous-month button is clicked

Set the message sent when the next-month button is clicked

Rendering

toMarkup : Theme -> DatePicker msg -> Element msg

Render the DatePicker as an Element msg