(canonicalize {:keys [mode value start end min max format locale separator
auto-swap? range-allow-same-day?]})Build stable model from raw attr strings.
Build stable model from raw attr strings.
(committed-value? canon)True when the canonicalized model holds at least one committed date.
True when the canonicalized model holds at least one committed date.
(day-flags d {:keys [mode value-d start-d end-d]})What the selection of canon makes of the Date d: selected, in the range, an edge of it.
What the selection of `canon` makes of the Date `d`: selected, in the range, an edge of it.
(day-out-of-range? d canon)True when the Date d is before the minimum or after the maximum of canon.
True when the Date `d` is before the minimum or after the maximum of `canon`.
(display-value canon {:keys [format locale]})Compute the input display string from canonicalized state.
Compute the input display string from canonicalized state.
(format-date d {:keys [format locale]})Format a JS Date for display. Uses Intl.DateTimeFormat when available.
Format a JS Date for display. Uses Intl.DateTimeFormat when available.
(normalize-str s)Trim and return nil if empty.
Trim and return nil if empty.
(parse-display->range display {:keys [separator]})Try to parse a display string that may contain a separator. Returns {:ok? boolean :start js/Date|nil :end js/Date|nil}.
Try to parse a display string that may contain a separator.
Returns {:ok? boolean :start js/Date|nil :end js/Date|nil}.(parse-display->single display)Try to parse a display string to a single date. Accepts ISO "YYYY-MM-DD". Returns {:ok? boolean :date js/Date|nil}.
Try to parse a display string to a single date.
Accepts ISO "YYYY-MM-DD". Returns {:ok? boolean :date js/Date|nil}.(parse-format s)Returns :iso or :localized. Default is :iso.
Returns :iso or :localized. Default is :iso.
(parse-int s default-v)Parse integer string, returning default-v on failure.
Parse integer string, returning default-v on failure.
(parse-mode s)Returns :single or :range. Default is :single.
Returns :single or :range. Default is :single.
(shown-days month canon focus-iso)What each of the 42 cells of the day grid shows for the month of the Date month, or none
with no month. Only the cell of focus-iso can be reached by Tab.
What each of the 42 cells of the day grid shows for the month of the Date `month`, or none with no month. Only the cell of `focus-iso` can be reached by Tab.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |