NoRedInk / datetimepicker-legacy / DateTimePicker.Config

THIS IS A HEAVILY MODIFIED FORK OF https://github.com/abadi199/datetimepicker

Configuration


type alias Config otherConfig msg =
{ otherConfig | onChange : State -> Maybe DateTimePicker.DateTime.DateTime -> msg
, usePicker : Basics.Bool
, attributes : List (Html.Styled.Attribute msg)
, fromInput : String -> Maybe DateTimePicker.DateTime.DateTime
, toInput : DateTimePicker.DateTime.DateTime -> String 
}

Configuration


type alias DatePickerConfig =
{ nameOfDays : NameOfDays
, firstDayOfWeek : Time.Weekday
, allowYearNavigation : Basics.Bool
, earliestDate : Maybe DateTimePicker.DateTime.DateTime 
}

Configuration for the DatePicker


type alias NameOfDays =
{ sunday : String
, monday : String
, tuesday : String
, wednesday : String
, thursday : String
, friday : String
, saturday : String 
}

Configuration for name of days in a week.

This will be displayed as the calendar's header. Default:


type Type msg
    = DateType (Config DatePickerConfig msg)
    | DateTimeType (Config DatePickerConfig msg)
    | TimeType (Config {} msg)

The type of picker (for Internal Use)

Default Configuration

defaultDatePickerConfig : (State -> Maybe DateTimePicker.DateTime.DateTime -> msg) -> Config DatePickerConfig msg

Default configuration for DatePicker

defaultTimePickerConfig : (State -> Maybe DateTimePicker.DateTime.DateTime -> msg) -> Config {} msg

Default configuration for TimePicker

defaultDateTimePickerConfig : (State -> Maybe DateTimePicker.DateTime.DateTime -> msg) -> Config DatePickerConfig msg

Default configuration for DateTimePicker

defaultDateFromInput : String -> Maybe DateTimePicker.DateTime.DateTime

Default date parser

defaultTimeFromInput : String -> Maybe DateTimePicker.DateTime.DateTime

Default time parser

defaultDateTimeFromInput : String -> Maybe DateTimePicker.DateTime.DateTime

Default date and time parser

defaultDateTimeToInput : DateTimePicker.DateTime.DateTime -> String

Default date and time printer

defaultDateToInput : DateTimePicker.DateTime.DateTime -> String

Default date printer

defaultTimeToInput : DateTimePicker.DateTime.DateTime -> String

Default time printer