[{"name":"DateRangePicker","comment":" A customizable date picker component.\n\n\n# Basics\n\n@docs Msg, DatePicker, subscriptions, view, update, openMsg\n\n@docs open, defaultOpener\n\n\n# Selection\n\n@docs Selection, Format, PosixRange, PartsRange, getSelection, getSelectionRange\n\n\n# Settings\n\n@docs Config, LanguageConfig, DatePickerVisibility, ClockStyle, englishLanguageConfig, DateSelectionType, PresetType, Interval, CustomPreset, CalendarType, defaultConfig, initWithOptions, updateModelWithConfig\n\n\n# Model Helpers\n\n@docs setCalendarType, presets, setOpen, setSelection, languageConfig, selectPreset, displayFormat, isOpen, resetModel, setDisplayFormat\n\n\n# Helpers\n\n@docs partsRangeToPosixRange, presetToDisplayString, hasRangeChanged, hasSelectionChanged, presetToPartsRange, displaySelection, displaygetSelection, defaultPresets, focusInput, getConfig, getEndOfDayParts, getStartOfDayParts\n\n","unions":[{"name":"CalendarType","comment":" The type which specifies what size calendar you want to display\n","args":[],"cases":[["YearCalendar",[]],["ThreeMonthCalendar",[]],["TwoMonthCalendar",[]],["OneMonthCalendar",[]]]},{"name":"ClockStyle","comment":" Represents if times should be displayed in 24 hours or 12 hour format\n","args":[],"cases":[["H24",[]],["H12",[]]]},{"name":"DatePicker","comment":" A record which represents the main datepicker model\n","args":[],"cases":[]},{"name":"DatePickerVisibility","comment":" The type of that represents the current visibility of the date picker\n","args":[],"cases":[["Open",[]],["Closed",[]],["AlwaysOpen",[]]]},{"name":"DateSelectionType","comment":" Represents if a single date or a range of dates should be selected.\n","args":[],"cases":[["DateRangeSelection",[]],["DateSelection",[]]]},{"name":"Format","comment":" The type which specifies if a user had specified a time in the input box as well as the selected date.\n","args":[],"cases":[["DateFormat",[]],["DateTimeFormat",["DateRangePicker.ClockStyle"]]]},{"name":"Interval","comment":" The type of interval for a custom preset\n","args":[],"cases":[["Days",[]],["Months",[]],["Weeks",[]],["Years",[]]]},{"name":"Msg","comment":" An opaque type representing messages that are passed inside the DatePicker.\n","args":[],"cases":[]},{"name":"PresetType","comment":" The type of that represents available presets that can be put in a preset menu.\n\nThere are a couple premade presets, but you can create a CustomPreset of your own as well.\n\n","args":[],"cases":[["Today",[]],["Yesterday",[]],["PastWeek",[]],["PastMonth",[]],["PastYear",[]],["Custom",["DateRangePicker.CustomPreset"]]]},{"name":"Selection","comment":" The type which represents what the current selection is in the datepicker.\n\nIf you select a preset you can use @presetToPartsRange to get the appropriate posix range for the selection.\n\n","args":[],"cases":[["Single",["Time.Extra.Parts"]],["Range",["DateRangePicker.PartsRange"]],["Unselected",[]],["Selecting",["DateRangePicker.PartsRange"]],["Preset",["DateRangePicker.PresetType"]],["Before",["Time.Extra.Parts"]],["After",["Time.Extra.Parts"]]]}],"aliases":[{"name":"Config","comment":" A record which specifies config options which can be set when initializes the datepicker\n","args":[],"type":"{ allowedRange : DateRangePicker.PartsRange, presets : List.List DateRangePicker.PresetType, calendarType : DateRangePicker.CalendarType, datepickerVisibility : DateRangePicker.DatePickerVisibility, languageConfig : DateRangePicker.LanguageConfig, dateSelectionType : DateRangePicker.DateSelectionType, canChooseTime : Basics.Bool, hidePresets : Basics.Bool, defaultSelection : Maybe.Maybe DateRangePicker.Selection, displayTimezone : Time.Zone, displayDate : Maybe.Maybe Time.Posix, clockStyle : DateRangePicker.ClockStyle, yPadding : Maybe.Maybe Basics.Int }"},{"name":"CustomPreset","comment":" A record that represents a user created custom preset\n\nA custom preset represents how to select a range of posix given today's date.\n\n","args":[],"type":"{ intervalStart : DateRangePicker.Interval, intervalStartValue : Basics.Int, intervalEnd : DateRangePicker.Interval, intervalEndValue : Basics.Int, display : String.String }"},{"name":"LanguageConfig","comment":" A record that can be used if a language other than english is wanted.\n","args":[],"type":"{ done : String.String, reset : String.String, datePickerInputPlaceholder : String.String, dateRangePickerInputPlaceholder : String.String, presets : String.String, today : String.String, yesterday : String.String, pastWeek : String.String, pastMonth : String.String, pastYear : String.String, includeTimeTitle : String.String, dateFormatLanguage : DateFormat.Language.Language, beforeThisDate : String.String, afterThisDate : String.String, am : String.String, pm : String.String, to : String.String, displayFormat : List.List DateFormat.Token }"},{"name":"PartsRange","comment":" Holds the beginning and end of the selection\n","args":[],"type":"{ start : Time.Extra.Parts, end : Time.Extra.Parts }"},{"name":"PosixRange","comment":" The type of that represents a range of two posix times.\n","args":[],"type":"{ start : Time.Posix, end : Time.Posix }"}],"values":[{"name":"defaultConfig","comment":" A default config which can be combined with @initWithOptions so that you only need to specify the fields which you want to customize\n","type":"DateRangePicker.Config"},{"name":"defaultOpener","comment":" A pre-made opener that can be used to open the datepicker instead of @open.\n\n    It will need an id so that the datepicker can dynamically be placed.\n\n    Html.map DatePickerMsgs <| defaultOpener model.datePicker openerId\n\nYou will need to call convert the message to the appropriate type via Html.map\n\n","type":"DateRangePicker.DatePicker -> String.String -> Html.Html DateRangePicker.Msg"},{"name":"defaultPresets","comment":" The defaults for the preset buttons\n","type":"List.List DateRangePicker.PresetType"},{"name":"displayFormat","comment":" Gets the current selection format\n","type":"DateRangePicker.DatePicker -> DateRangePicker.Format"},{"name":"displaySelection","comment":" A helper function to display the selection in the same way that the datepicker does\n","type":"DateRangePicker.DatePicker -> String.String"},{"name":"displaygetSelection","comment":" A helper function to display the selection in the same way that the datepicker does. It is in utc time.\n","type":"DateRangePicker.DatePicker -> String.String"},{"name":"englishLanguageConfig","comment":" The default english language\n","type":"DateRangePicker.LanguageConfig"},{"name":"focusInput","comment":" focuses the inputbox\n","type":"Platform.Cmd.Cmd DateRangePicker.Msg"},{"name":"getConfig","comment":" Gets the current languageConfig\n","type":"DateRangePicker.DatePicker -> DateRangePicker.Config"},{"name":"getEndOfDayParts","comment":" Sets all of the time parts to their logical end except for milliseconds\n","type":"Time.Extra.Parts -> Time.Extra.Parts"},{"name":"getSelection","comment":" Get the current selection in local time.\n","type":"DateRangePicker.DatePicker -> DateRangePicker.Selection"},{"name":"getSelectionRange","comment":" A convenience function to get the current selection as a parts range in local time.\n","type":"DateRangePicker.DatePicker -> Maybe.Maybe DateRangePicker.PartsRange"},{"name":"getStartOfDayParts","comment":" sets all of the timne parts to 0\n","type":"Time.Extra.Parts -> Time.Extra.Parts"},{"name":"hasRangeChanged","comment":" Check if the selection has changed.\n","type":"DateRangePicker.DatePicker -> Maybe.Maybe DateRangePicker.PartsRange -> Basics.Bool"},{"name":"hasSelectionChanged","comment":" Check if the selection has changed.\n","type":"DateRangePicker.DatePicker -> Maybe.Maybe DateRangePicker.Selection -> Basics.Bool"},{"name":"initWithOptions","comment":" Initialize the datepicker with the default settings\n","type":"Time.Posix -> Maybe.Maybe Time.Posix -> DateRangePicker.Config -> DateRangePicker.DatePicker"},{"name":"isOpen","comment":" Checks if the datepicker is open\n","type":"DateRangePicker.DatePicker -> Basics.Bool"},{"name":"languageConfig","comment":" Gets the current languageConfig\n","type":"DateRangePicker.DatePicker -> DateRangePicker.LanguageConfig"},{"name":"open","comment":" A helper attribute which allows you to open the datepicker using any html element.\n\n    The element you place this attribute on has to have an id so that the datepicker can dynamically be placed.\n\n    Html.map DatePickerMsgs <| button [Html.Attribute.id openerId, open openerId ] [ text \"Open Me!\" ]\n\nYou will need to call convert the message to the appropriate type via Html.map\n\n","type":"String.String -> Html.Attribute DateRangePicker.Msg"},{"name":"openMsg","comment":" The open date picker msg so you can open the date picker with a custom event\n","type":"String.String -> DateRangePicker.Msg"},{"name":"partsRangeToPosixRange","comment":" conversion from partsrnage to posix range\n","type":"Time.Zone -> DateRangePicker.PartsRange -> DateRangePicker.PosixRange"},{"name":"presetToDisplayString","comment":" A helper function to get the display value for a given preset\n","type":"DateRangePicker.PresetType -> DateRangePicker.LanguageConfig -> String.String"},{"name":"presetToPartsRange","comment":" Converts a preset to a selectable value\n","type":"DateRangePicker.DatePicker -> DateRangePicker.PresetType -> DateRangePicker.PartsRange"},{"name":"presets","comment":" Gets the current presets\n","type":"DateRangePicker.DatePicker -> List.List DateRangePicker.PresetType"},{"name":"resetModel","comment":" Change the datePicker's current config. This will reset changed state.\n","type":"DateRangePicker.DatePicker -> DateRangePicker.DatePicker"},{"name":"selectPreset","comment":" A helper function to set a preset outside of the default preset ui\n","type":"DateRangePicker.PresetType -> DateRangePicker.DatePicker -> DateRangePicker.DatePicker"},{"name":"setCalendarType","comment":" A helper function to change the calendar type on an existing model. Usually you should use @initWithOptions and configure this at initialization.\n","type":"DateRangePicker.CalendarType -> DateRangePicker.DatePicker -> DateRangePicker.DatePicker"},{"name":"setDisplayFormat","comment":" sets the current selection format\n","type":"DateRangePicker.Format -> DateRangePicker.DatePicker -> DateRangePicker.DatePicker"},{"name":"setOpen","comment":" Set whether or not the datepicker is open. Usually you should use @open or @defaultOpener to manage this.\n","type":"DateRangePicker.DatePicker -> DateRangePicker.DatePickerVisibility -> DateRangePicker.DatePicker"},{"name":"setSelection","comment":" Sets the datepicker's selection outside of the ui. Normally the ui should have all the interactions you would want.\n","type":"DateRangePicker.Selection -> DateRangePicker.DatePicker -> DateRangePicker.DatePicker"},{"name":"subscriptions","comment":" The subscriptions for the datepicker\n\n    Sub.map DatePickerMsgs <|\n        DateRangePicker.subscriptions model.datePicker\n\n","type":"DateRangePicker.DatePicker -> Platform.Sub.Sub DateRangePicker.Msg"},{"name":"update","comment":" The update for the datepicker. You will need to integrate this into your own update.\n\n    DatePickerMsgs msg_ ->\n        let\n            ( newDateRangePicker, dateRangePickerCmd ) =\n                DateRangePicker.update msg_ model.datePicker\n        in\n        ( { model | datePicker = newDateRangePicker }, Cmd.map DatePickerMsgs dateRangePickerCmd )\n\n","type":"DateRangePicker.Msg -> DateRangePicker.DatePicker -> ( DateRangePicker.DatePicker, Platform.Cmd.Cmd DateRangePicker.Msg )"},{"name":"updateModelWithConfig","comment":" Change the datePicker's current config. This will reset changed state.\n","type":"DateRangePicker.DatePicker -> DateRangePicker.Config -> DateRangePicker.DatePicker"},{"name":"view","comment":" The view for the datepicker. You will have to pass in the current time as well as the local zone and the datepicker model.\n\n    DateRangePicker.view datePicker\n\n","type":"DateRangePicker.DatePicker -> Html.Html DateRangePicker.Msg"}],"binops":[]}]