[{"name":"DatePicker.DateInput","comment":" A configurable DateInput component, formatting and validating text input for dates and times\n\n\n# Model & Msg\n\n@docs DateInput, InputError, Msg\n\n\n# Configuration & Settings\n\n@docs Config, Format, DateFormat, TimeFormat, DatePattern, Settings\n\n\n# Defaults\n\n@docs defaultConfig, defaultDateFormat, defaultFormat, defaultSettings, defaultTimeFormat\n\n\n# Init & Updates\n\n@docs clear, init, toPosix, update, updateFromPosix\n\n\n# Query\n\n@docs hasDurationError, hasError, isInitial\n\n\n# IDs\n\n@docs containerId, durationEndId, durationStartId, textFieldId\n\n\n# View\n\n@docs view, viewContainer, viewDurationInputs, viewPlaceholder\n\n\n# Test\n\n@docs partsToPosix, sanitizeInputValue, inputValueToParts, partsToInputValue, catchError\n\n","unions":[{"name":"DateInput","comment":" The opaque type representing a particular DateInput instance.\n","args":["msg"],"cases":[]},{"name":"DatePattern","comment":" Available date format patterns.\n","args":[],"cases":[["DDMMYYYY",[]],["MMDDYYYY",[]],["YYYYMMDD",[]],["YYYYDDMM",[]]]},{"name":"Format","comment":" Supported date and time formats.\n","args":[],"cases":[["Date",["DatePicker.DateInput.DateFormat"]],["DateTime",["DatePicker.DateInput.DateFormat","DatePicker.DateInput.TimeFormat"]]]},{"name":"InputError","comment":" Possible errors in the DateInput field.\n","args":[],"cases":[["ValueInvalid",[]],["ValueNotAllowed",[]],["DurationInvalid",[]]]},{"name":"Msg","comment":" Messages that can be sent through user interaction to update the DateInput model.\n","args":[],"cases":[]}],"aliases":[{"name":"Config","comment":" Configuration settings for DateInput.\n","args":[],"type":"{ dateInputSettings : DatePicker.DateInput.Settings, isDayDisabled : Time.Zone -> Time.Posix -> Basics.Bool, zone : Time.Zone, theme : DatePicker.Theme.Theme, id : String.String }"},{"name":"DateFormat","comment":" Configuration for date formats.\n","args":[],"type":"{ pattern : DatePicker.DateInput.DatePattern, separator : Char.Char, placeholders : DatePicker.DateInput.DateParts Char.Char }"},{"name":"Settings","comment":" Settings for the DateInput component.\n","args":[],"type":"{ format : DatePicker.DateInput.Format, getErrorMessage : DatePicker.DateInput.InputError -> String.String }"},{"name":"TimeFormat","comment":" Configuration for time formats.\n","args":[],"type":"{ separator : Char.Char, placeholders : DatePicker.DateInput.TimeParts Char.Char, allowedTimesOfDay : Time.Zone -> Time.Posix -> { startHour : Basics.Int, startMinute : Basics.Int, endHour : Basics.Int, endMinute : Basics.Int } }"}],"values":[{"name":"catchError","comment":" Checks if the input value, date parts, and time parts are valid\nand allowed based on the provided configuration, returning an optional error.\n","type":"DatePicker.DateInput.Config -> String.String -> DatePicker.DateInput.DateParts (Maybe.Maybe Basics.Int) -> DatePicker.DateInput.TimeParts (Maybe.Maybe Basics.Int) -> Maybe.Maybe DatePicker.DateInput.InputError"},{"name":"clear","comment":" Clears the DateInput field.\n","type":"DatePicker.DateInput.DateInput msg -> DatePicker.DateInput.DateInput msg"},{"name":"containerId","comment":" Generates the ID for the container element based on the provided configuration.\n","type":"DatePicker.DateInput.Config -> String.String"},{"name":"defaultConfig","comment":" Default configuration for DateInput.\n","type":"Time.Zone -> DatePicker.DateInput.Config"},{"name":"defaultDateFormat","comment":" Default date format pattern.\n","type":"DatePicker.DateInput.DateFormat"},{"name":"defaultFormat","comment":" Default format used for DateInput.\n","type":"DatePicker.DateInput.Format"},{"name":"defaultSettings","comment":" Default settings for DateInput.\n","type":"DatePicker.DateInput.Settings"},{"name":"defaultTimeFormat","comment":" Default time format settings.\n","type":"DatePicker.DateInput.TimeFormat"},{"name":"durationEndId","comment":" Generates the ID for a duration's end input element based on the provided configuration.\n","type":"String.String -> String.String"},{"name":"durationStartId","comment":" Generates the ID for a duration's start input element based on the provided configuration.\n","type":"String.String -> String.String"},{"name":"hasDurationError","comment":" Checks if one of the two DateInputs of a duration input has an error, returning a boolean and an optional error.\n","type":"Time.Zone -> ( DatePicker.DateInput.DateInput msg, DatePicker.DateInput.DateInput msg ) -> ( Basics.Bool, Maybe.Maybe DatePicker.DateInput.InputError )"},{"name":"hasError","comment":" Checks if the DateInput has an error.\n","type":"DatePicker.DateInput.DateInput msg -> Basics.Bool"},{"name":"init","comment":" Returns a DateInput instance initialized with default values.\n","type":"(DatePicker.DateInput.Msg -> msg) -> DatePicker.DateInput.DateInput msg"},{"name":"inputValueToParts","comment":" Converts an input string into date and time parts.\n","type":"DatePicker.DateInput.Format -> String.String -> ( DatePicker.DateInput.DateParts (Maybe.Maybe Basics.Int), DatePicker.DateInput.TimeParts (Maybe.Maybe Basics.Int) )"},{"name":"isInitial","comment":" Checks if it's still the initial model\n","type":"DatePicker.DateInput.DateInput msg -> Basics.Bool"},{"name":"partsToInputValue","comment":" Converts date and time parts into an input string value.\n","type":"DatePicker.DateInput.Format -> DatePicker.DateInput.DateParts (Maybe.Maybe Basics.Int) -> DatePicker.DateInput.TimeParts (Maybe.Maybe Basics.Int) -> Maybe.Maybe String.String"},{"name":"partsToPosix","comment":" Converts date and time parts into a Posix time.\n\nReturns Nothing if the parts do not form a valid date/time.\n\n","type":"Time.Zone -> DatePicker.DateInput.DateParts (Maybe.Maybe Basics.Int) -> DatePicker.DateInput.TimeParts (Maybe.Maybe Basics.Int) -> Maybe.Maybe Time.Posix"},{"name":"sanitizeInputValue","comment":" Cleans and truncates the user input value based on the given format.\n","type":"DatePicker.DateInput.Format -> String.String -> String.String"},{"name":"textFieldId","comment":" Generates the ID for the text field element based on the provided configuration.\n","type":"DatePicker.DateInput.Config -> String.String"},{"name":"toPosix","comment":" Converts a DateInput model into a Posix time, if possible.\n","type":"Time.Zone -> DatePicker.DateInput.DateInput msg -> Maybe.Maybe Time.Posix"},{"name":"update","comment":" Update the DateInput based on user interaction according to the given internal msg.\n\nReturns the updated DateInput and a Cmd msg.\n\n","type":"DatePicker.DateInput.Config -> DatePicker.DateInput.Msg -> DatePicker.DateInput.DateInput msg -> ( DatePicker.DateInput.DateInput msg, Platform.Cmd.Cmd msg )"},{"name":"updateFromPosix","comment":" Updates the DateInput model from a given Posix time.\n\nConverts the time into date and time parts and updates the model accordingly.\n\n","type":"DatePicker.DateInput.Config -> Time.Zone -> Time.Posix -> DatePicker.DateInput.DateInput msg -> DatePicker.DateInput.DateInput msg"},{"name":"view","comment":" Renders a single date input element view with error handling and theme styling.\n","type":"List.List (Html.Styled.Attribute msg) -> DatePicker.DateInput.Config -> DatePicker.DateInput.DateInput msg -> Html.Styled.Html msg"},{"name":"viewContainer","comment":" Renders a container element for the date input element.\nThis element is scaled to the date input element's size and is used to position the picker popover.\n","type":"DatePicker.Theme.Theme -> List.List (Html.Styled.Attribute msg) -> List.List (Html.Styled.Html msg) -> Html.Styled.Html msg"},{"name":"viewDurationInputs","comment":" Renders two date input fields (start and end) for duration picking with error handling and theme styling.\n","type":"List.List (Html.Styled.Attribute msg) -> DatePicker.DateInput.Config -> ( DatePicker.DateInput.DateInput msg, DatePicker.DateInput.DateInput msg ) -> Html.Styled.Html msg"},{"name":"viewPlaceholder","comment":" Renders a placeholder view based on the configuration.\nThis element is empty and scaled to the date input element's size. It is used in combination with\nthe picker popover working as a placeholder to arrange the picker popover's layout. The real date\ninput element will be positioned fixed above this element when the picker popover is opened.\n","type":"DatePicker.DateInput.Config -> Html.Styled.Html msg"}],"binops":[]},{"name":"DatePicker.Settings","comment":" All settings and configuration utilities for both pickers.\n\n\n# Settings\n\n@docs Settings, defaultSettings\n@docs TimePickerVisibility, TimePickerSettings, defaultTimePickerSettings\n@docs Preset, PresetDateConfig, PresetRangeConfig\n\n\n# Query\n\n@docs generatePickerDay, getTimePickerSettings, isTimePickerVisible\n@docs isPresetDateActive, isPresetRangeActive\n\n","unions":[{"name":"Preset","comment":" A shared type facilitating the preset variants for both pickers\n","args":[],"cases":[["PresetDate",["DatePicker.Settings.PresetDateConfig"]],["PresetRange",["DatePicker.Settings.PresetRangeConfig"]]]},{"name":"TimePickerVisibility","comment":" Set the visibility of the timepicker in the `DateTimePicker`\n\n`NeverVisible` - The time picker is never visible. Please note that\nwhile ostensibly picking a day, a selection still returns a Posix\nrepresenting the beginning of that day (00:00). It is up to you to\nprocess the selection accordingly if you wish to treat it as a whole day.\n\n`Toggleable` - The time picker visibility can be toggled but\nis by default closed when the datetime picker is opened. Additional\nconfiguration can be achieved via `TimePickerSettings`.\n\n`AlwaysVisible` - The time picker is always visible. This is the default setting\nas it most explicitly shows that the datetime picker is indeed picking both\na date and time, not simply a date. Additional configuration can be achieved\nvia `TimePickerSettings`.\n\n","args":[],"cases":[["NeverVisible",[]],["Toggleable",["DatePicker.Settings.TimePickerSettings"]],["AlwaysVisible",["DatePicker.Settings.TimePickerSettings"]]]}],"aliases":[{"name":"PresetDateConfig","comment":" Set type facilitating the preset dates\n`title` - the displayed name of the preset\n`date` - the `Posix` the preset will select in the date picker.\n","args":[],"type":"{ title : String.String, date : Time.Posix }"},{"name":"PresetRangeConfig","comment":" Set type facilitating the preset date ranges\n`title` - the displayed name of the preset\n`range` - the time range the date range picker will select, consisting of\na start-`Posix` and an end-`Posix`.\n","args":[],"type":"{ title : String.String, range : { start : Time.Posix, end : Time.Posix } }"},{"name":"Settings","comment":" The type facilitating the configuration of the datepicker settings.\n\n`id` - provides a custom id to the picker element\n`zone` - the `Zone` in which the date picker is being used (client zone)\n`formattedDay` - a function that returns a string representation for the provided day of the week\n`formattedMonth` - a function that returns a string representation for the provided month\n`isDayDisabled` - a function that determines if the combined `Posix` and `Zone` represent a day that should be disabled in the picker\n`focusedDate` - a `Posix` that represents a day that should be highlighted on the picker (i.e. the current day)\n`dateStringFn` - a function that returns a string representation of the selected day\n`timePickerVisibility` - see below\n`showCalendarWeekNumbers` - wheather to display or not display caldendar week numbers\n`presets` - a list of `Presets`, for selectable, preconfigured dates\n`theme` - a record of customizable design tokens\n\nMore information can be found in the [examples](https://github.com/mercurymedia/elm-datetime-picker/tree/master/examples).\n\n","args":[],"type":"{ zone : Time.Zone, id : String.String, firstWeekDay : Time.Weekday, formattedDay : Time.Weekday -> String.String, formattedMonth : Time.Month -> String.String, isDayDisabled : Time.Zone -> Time.Posix -> Basics.Bool, focusedDate : Maybe.Maybe Time.Posix, dateStringFn : Time.Zone -> Time.Posix -> String.String, timePickerVisibility : DatePicker.Settings.TimePickerVisibility, showCalendarWeekNumbers : Basics.Bool, presets : List.List DatePicker.Settings.Preset, theme : DatePicker.Theme.Theme, dateInputSettings : DatePicker.DateInput.Settings }"},{"name":"TimePickerSettings","comment":" The type facilitating the configuration of the timepicker settings.\n\n`timeStringFn` - a function that returns a string representation of the selected time of day\n\nBecause it could be the case that a picker is being used in a different\ntimezone than the home timezone of the implementor, the `allowedTimesofDay`\nfunction ingests a `Zone` in addition to a `Posix`. The\n`Zone` represents the time zone in which the picker is being used. An\nimplementor can leverage this to compare against a base time zone when\nenforcing allowable times of day, etc. You SHOULD assume that the `Posix`\npassed into these functions is floored to the start of its respective `Day`.\n\nMore information can be found in the [examples](https://github.com/mercurymedia/elm-datetime-picker/tree/master/examples).\n\n","args":[],"type":"{ timeStringFn : Time.Zone -> Time.Posix -> String.String, allowedTimesOfDay : Time.Zone -> Time.Posix -> { startHour : Basics.Int, startMinute : Basics.Int, endHour : Basics.Int, endMinute : Basics.Int } }"}],"values":[{"name":"defaultSettings","comment":" A record of default settings for the date picker. Extend this if\nyou want to further customize the date picker.\n\nRequires a `Zone` to inform the picker in which time zone it should\ndisplay the selected duration as well as a `msg` that expects a tuple containing\na datepicker instance and a `Maybe` tuple representing a selected duration.\n\n    ( DatePicker, Maybe ( Posix, Posix ) ) -> msg\n\n","type":"Time.Zone -> DatePicker.Settings.Settings"},{"name":"defaultTimePickerSettings","comment":" A record of default settings for the time picker. Extend this if\nyou want to further customize the time picker.\n","type":"DatePicker.Settings.TimePickerSettings"},{"name":"generatePickerDay","comment":" Transforms a `Posix` into a `PickerDay` based on the `Settings`\n","type":"DatePicker.Settings.Settings -> Time.Posix -> DatePicker.Utilities.PickerDay"},{"name":"getTimePickerSettings","comment":" Extracts the `TimePickerSettings` from the `Settings`\n","type":"DatePicker.Settings.Settings -> Maybe.Maybe DatePicker.Settings.TimePickerSettings"},{"name":"isPresetDateActive","comment":" Determines if a selected date matches a given preset\n","type":"DatePicker.Settings.Settings -> Maybe.Maybe ( DatePicker.Utilities.PickerDay, Time.Posix ) -> DatePicker.Settings.PresetDateConfig -> Basics.Bool"},{"name":"isPresetRangeActive","comment":" Determines if a selected date range matches a given preset range\n","type":"DatePicker.Settings.Settings -> Maybe.Maybe ( DatePicker.Utilities.PickerDay, Time.Posix ) -> Maybe.Maybe ( DatePicker.Utilities.PickerDay, Time.Posix ) -> DatePicker.Settings.PresetRangeConfig -> Basics.Bool"},{"name":"isTimePickerVisible","comment":" Determines whether the time picker is visible based on the `TimePickerVisibility`.\n","type":"DatePicker.Settings.TimePickerVisibility -> Basics.Bool"}],"binops":[]},{"name":"DatePicker.Theme","comment":" This module defines the `Theme` type and a `defaultTheme` for a date picker component.\n\n@docs Theme, defaultTheme\n\n","unions":[],"aliases":[{"name":"Theme","comment":" The type facilitating the Theme with the most important design tokens\n","args":[],"type":"{ fontSize : { base : Basics.Float, sm : Basics.Float, xs : Basics.Float, xxs : Basics.Float }, color : { text : { primary : Css.Color, secondary : Css.Color, disabled : Css.Color, error : Css.Color }, primary : { main : Css.Color, contrastText : Css.Color, light : Css.Color }, background : { container : Css.Color, footer : Css.Color, presets : Css.Color, input : Css.Color }, action : { hover : Css.Color }, border : Css.Color }, size : { presetsContainer : Basics.Float, day : Basics.Float, iconButton : Basics.Float, inputElement : Basics.Float }, spacing : { base : Basics.Float }, borderWidth : Basics.Float, borderRadius : { base : Basics.Float, lg : Basics.Float }, boxShadow : { offsetX : Basics.Float, offsetY : Basics.Float, blurRadius : Basics.Float, spreadRadius : Basics.Float, color : Css.Color }, zIndex : Basics.Int, transition : { duration : Basics.Float }, classNamePrefix : String.String }"}],"values":[{"name":"defaultTheme","comment":" The default theme that is included in the defaultSettings\n","type":"DatePicker.Theme.Theme"}],"binops":[]},{"name":"DurationDatePicker","comment":" A date picker component for picking a datetime range.\n\n\n# Architecture\n\n@docs DatePicker, Msg, init, view, viewDurationInput, update, subscriptions\n\n\n# Externally Triggered Actions\n\n@docs openPicker, closePicker, updatePickerPosition\n\n\n# Query\n\n@docs isOpen, hasError\n\n","unions":[{"name":"DatePicker","comment":" The opaque type representing a particular date picker instance.\n","args":["msg"],"cases":[]},{"name":"Msg","comment":" Internal Msg's to update the picker.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"closePicker","comment":" Close the provided date picker and receive the updated picker instance.\n","type":"DurationDatePicker.DatePicker msg -> DurationDatePicker.DatePicker msg"},{"name":"hasError","comment":" Indicates whether the DatePicker's date inputs have a validation error\n","type":"DatePicker.Settings.Settings -> DurationDatePicker.DatePicker msg -> Basics.Bool"},{"name":"init","comment":" Instantiates and returns a date picker.\n","type":"(DurationDatePicker.Msg -> msg) -> DurationDatePicker.DatePicker msg"},{"name":"isOpen","comment":" Indicates whether the DatePicker is open\n","type":"DurationDatePicker.DatePicker msg -> Basics.Bool"},{"name":"openPicker","comment":" Open the provided date picker and receive the updated picker instance. Also\ntakes a default time the picker should center on (in the event a time has not yet\nbeen picked) as well as the picked start and end times. A common example of a default time\nwould be the datetime for the current day.\n","type":"String.String -> DatePicker.Settings.Settings -> Time.Posix -> Maybe.Maybe Time.Posix -> Maybe.Maybe Time.Posix -> DurationDatePicker.DatePicker msg -> ( DurationDatePicker.DatePicker msg, Platform.Cmd.Cmd msg )"},{"name":"subscriptions","comment":" Events external to the picker to which it is subscribed.\n","type":"DatePicker.Settings.Settings -> DurationDatePicker.DatePicker msg -> Platform.Sub.Sub msg"},{"name":"update","comment":" Update the DurationDatePicker according to the given internal msg.\n\nReturns the updated picker and the currently selected start and end datetime, if available.\n\n","type":"DatePicker.Settings.Settings -> DurationDatePicker.Msg -> DurationDatePicker.DatePicker msg -> ( ( DurationDatePicker.DatePicker msg, Maybe.Maybe ( Time.Posix, Time.Posix ) ), Platform.Cmd.Cmd msg )"},{"name":"updatePickerPosition","comment":" Returns the command to update the trigger & picker DOM elements' instances.\nIs used internally but can also be used externally in case of a changing viewport\n(e.g. onScroll or onResize).\n","type":"DurationDatePicker.DatePicker msg -> ( DurationDatePicker.DatePicker msg, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" The date picker view. Simply pass it the configured settings\nand the date picker instance you wish to view.\n","type":"DatePicker.Settings.Settings -> DurationDatePicker.DatePicker msg -> Html.Html msg"},{"name":"viewDurationInput","comment":" The duration date inputs view with the date picker opening on click.\nPass it the configured settings, the base time, the picked start and end times\nand the date picker instance you wish to view.\n","type":"List.List (Html.Attribute msg) -> DatePicker.Settings.Settings -> Time.Posix -> Maybe.Maybe Time.Posix -> Maybe.Maybe Time.Posix -> DurationDatePicker.DatePicker msg -> Html.Html msg"}],"binops":[]},{"name":"SingleDatePicker","comment":" A date picker component for a single datetime.\n\n\n# Architecture\n\n@docs DatePicker, Msg, init, view, viewDateInput, update, subscriptions\n\n\n# Externally Triggered Actions\n\n@docs openPicker, closePicker, updatePickerPosition\n\n\n# Query\n\n@docs isOpen, hasError\n\n","unions":[{"name":"DatePicker","comment":" The opaque type representing a particular date picker instance.\n","args":["msg"],"cases":[]},{"name":"Msg","comment":" Internal Msg's to update the picker.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"closePicker","comment":" Close the provided date picker and receive the updated picker instance.\n","type":"SingleDatePicker.DatePicker msg -> SingleDatePicker.DatePicker msg"},{"name":"hasError","comment":" Indicates whether the DatePicker's date inputs have a validation error\n","type":"SingleDatePicker.DatePicker msg -> Basics.Bool"},{"name":"init","comment":" Instantiates and returns a date picker.\n","type":"(SingleDatePicker.Msg -> msg) -> SingleDatePicker.DatePicker msg"},{"name":"isOpen","comment":" Indicates whether the DatePicker is open\n","type":"SingleDatePicker.DatePicker msg -> Basics.Bool"},{"name":"openPicker","comment":" Open the provided date picker and receive the updated picker instance. Also\ntakes a default time the picker should center on (in the event a time has not yet\nbeen picked) as well as the picked time. A common example of a default time\nwould be the datetime for the current day.\n","type":"String.String -> DatePicker.Settings.Settings -> Time.Posix -> Maybe.Maybe Time.Posix -> SingleDatePicker.DatePicker msg -> ( SingleDatePicker.DatePicker msg, Platform.Cmd.Cmd msg )"},{"name":"subscriptions","comment":" Events external to the picker to which it is subscribed.\n","type":"DatePicker.Settings.Settings -> SingleDatePicker.DatePicker msg -> Platform.Sub.Sub msg"},{"name":"update","comment":" Update the SingleDatePicker according to the given internal msg.\n\nReturns the updated picker and the currently selected datetime, if available.\n\n","type":"DatePicker.Settings.Settings -> SingleDatePicker.Msg -> SingleDatePicker.DatePicker msg -> ( ( SingleDatePicker.DatePicker msg, Maybe.Maybe Time.Posix ), Platform.Cmd.Cmd msg )"},{"name":"updatePickerPosition","comment":" Returns the command to update the trigger & picker DOM elements' instances.\nIs used internally but can also be used externally in case of a changing viewport\n(e.g. onScroll or onResize).\n","type":"SingleDatePicker.DatePicker msg -> ( SingleDatePicker.DatePicker msg, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" The date picker view. Simply pass it the configured settings\nand the date picker instance you wish to view.\n","type":"DatePicker.Settings.Settings -> SingleDatePicker.DatePicker msg -> Html.Html msg"},{"name":"viewDateInput","comment":" The date input view with the date picker opening on click.\nPass it the configured settings, the base time, the picked time\nand the date picker instance you wish to view.\n","type":"List.List (Html.Attribute msg) -> DatePicker.Settings.Settings -> Time.Posix -> Maybe.Maybe Time.Posix -> SingleDatePicker.DatePicker msg -> Html.Html msg"}],"binops":[]}]