Mixins / foldkit-mixins-ui

Dropdowns

interface · packages/mixins-ui/src/calendar.ts:240

interface Dropdowns<Message> {
  readonly model: CalendarModel
  readonly onShow: (shown: Shown) => Message
  readonly years?:
    | {
        readonly from: number
        readonly to: number
      }
    | undefined
  readonly labels?:
    | {
        readonly month: string
        readonly year: string
      }
    | undefined
}

The month and year selects in place of the heading.

In the guides

Members

Dropdowns.model

property · packages/mixins-ui/src/calendar.ts:242

readonly model: CalendarModel

The calendar's Model, for its names, the month shown and its bounds.

Dropdowns.onShow

property · packages/mixins-ui/src/calendar.ts:244

readonly onShow: (shown: Shown) => Message

Sent for a choice; answer it with show.

Dropdowns.years

property · packages/mixins-ui/src/calendar.ts:246

readonly years?:
  | {
      readonly from: number
      readonly to: number
    }
  | undefined

The years offered; default the bounds' years, or ten either side of the year shown.

Dropdowns.labels

property · packages/mixins-ui/src/calendar.ts:248

readonly labels?:
  | {
      readonly month: string
      readonly year: string
    }
  | undefined

The selects' names; default Month and Year.