primait / pyxis-components / Prima.Pyxis.Form.DatePicker

Configuration


type alias Model =
{ date : Date
, selectingYear : Basics.Bool
, daysPickerRange : ( Date
, Date ) 
}

Represents the DatePicker's Model.


type Msg
    = Noop
    | YearSelection
    | DaySelection
    | PrevMonth
    | NextMonth
    | SelectYear Basics.Int
    | SelectDay Basics.Int
    | SelectDate Date

The DatePicker message


type Date
    = ParsedDate Date
    | PartialDate (Maybe String)

Represents a Date. It can be a valid one (ParsedDate Date.Date) or a partial

Configuration Methods

init : Date -> ( Date, Date ) -> Model

Get initial time picker model

update : Msg -> Model -> Model

Rendering

render : Model -> Html Msg

Methods

selectedDate : Model -> Date

Returns currently selected date

setDate : Date -> Model -> Model

Selects a valid Date into the DatePicker

toMaybeDate : Date -> Maybe Date

Converts DatePicker.Date into a Maybe elm Date

isPartialDate : Date -> Basics.Bool

Returns true if Date is a Partial one

isParsedDate : Date -> Basics.Bool

Returns true if date is valid

fromMaybeDate : Maybe Date -> Date

Converts a Maybe elm Date into a DatePicker.Date