Mixins / foldkit-mixins-ui

Dropdowns

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

interface Dropdowns<Message> {
  readonly model: CalendarModel
  readonly onShow: (shown: Shown) => Message
  readonly years?:
    | {
        readonly from: number
        readonly to: number
      }
    | undefined
  readonly month?: 'select' | 'label' | undefined
  readonly words?:
    | {
        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:291

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:293

readonly onShow: (shown: Shown) => Message

Sent for a choice; answer it with show.

Dropdowns.years

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

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.month

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

readonly month?: 'select' | 'label' | undefined

label writes the month as text and leaves only the years a select; default select.

Dropdowns.words

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

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

The selects' names; default Month and Year.