alexbruf/elm-cally/1.0.0

NOTE: the latest version is 1.1.0

Cally.Heading

The picker heading as a child you can place yourself.

Cally has no calendar-heading element: its heading is a slot on the base, filled with Intl.formatRange output. elm-cally exposes the same formatter as a child so you can drop a heading next to the selects, or format the page yourself.

Cally.Date.view { config | heading = Just custom } value model
    [ Cally.Month.view { offset = 0 } ]


custom context =
    Cally.Heading.view
        { year = Just Cally.Locale.YearNumeric
        , month = Just Cally.Locale.MonthLong
        }
        context
view : HeadingFormat -> Context msg -> Html msg

Render <calendar-heading part="heading"> around the formatted page.

format : HeadingFormat -> Locale -> Page -> String

The heading text for a page: one year-month when the page is a single month, otherwise the locale's range format.