PanagiotisGeorgiadis / elm-datepicker / DatePicker.Types

Contains types that are being used by the parent application in order to initialise a DatePicker.

Types


type ViewType
    = Single
    | Double

The Calendar ViewTypes.


type alias CalendarConfig =
{ today : DateTime
, startingWeekday : Time.Weekday
, primaryDate : Maybe DateTime
, dateLimit : DateLimit 
}

Used in order to configure the Calendar part of the DatePicker.


type DateLimit
    = DateLimit ({ minDate : DateTime, maxDate : DateTime })
    | NoLimit

The optional DatePicker date restrictions. You can cover most of the date restriction cases with the type below. If by any change you need to achieve a case which is not possible by the current implementation please raise an issue on the repository of this package.

-- A Custom imposed restriction for the year 2019
-- inclusive of the minDate and maxDate.
DateLimit { minDate = 1 Jan 2019, maxDate = 31 Dec 2019 }

-- An unlimited Calendar.
NoLimit


type alias TimePickerConfig =
{ pickerType : TimePicker.Types.PickerType
, defaultTime : Clock.Time
, pickerTitle : String 
}

Used in order to configure the TimePicker part of the DatePicker.