# m3e/datepicker

Datepicker is presents a date picker on a temporary surface.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

         DO NOT EDIT

# Types

## Clearable

</>

Clearable is whether the user can clear the selected date and close the picker.

    pub type Clearable {
      IsClearable
      IsNotClearable
    }

### Constructors

-     IsClearable

-     IsNotClearable

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        variant: datepicker_variant.DatepickerVariant,
        clearable: Clearable,
        date: option.Option(date.Date),
        max_date: option.Option(date.Date),
        min_date: option.Option(date.Date),
        range_end: option.Option(date.Date),
        range_start: option.Option(date.Date),
        start_at: option.Option(date.Date),
        start_view: calendar_view.CalendarView,
        previous_month_label: String,
        next_month_label: String,
        previous_year_label: String,
        next_year_label: String,
        previous_multi_year_label: String,
        next_multi_year_label: String,
        clear_label: String,
        confirm_label: String,
        dismiss_label: String,
        label: String,
      )
    }

### Constructors

-     Config(
        variant: datepicker_variant.DatepickerVariant,
        clearable: Clearable,
        date: option.Option(date.Date),
        max_date: option.Option(date.Date),
        min_date: option.Option(date.Date),
        range_end: option.Option(date.Date),
        range_start: option.Option(date.Date),
        start_at: option.Option(date.Date),
        start_view: calendar_view.CalendarView,
        previous_month_label: String,
        next_month_label: String,
        previous_year_label: String,
        next_year_label: String,
        previous_multi_year_label: String,
        next_multi_year_label: String,
        clear_label: String,
        confirm_label: String,
        dismiss_label: String,
        label: String,
      )

## Datepicker

opaque </>

Datepicker is a View Model for this component

## Fields:

- variant: The appearance variant of the picker.
- clearable: Whether the user can clear the selected date and close the picker.
- date: The selected date.
- max_date: The maximum date that can be selected.
- min_date: The minimum date that can be selected.
- range_end: End of a date range.
- range_start: Start of a date range.
- start_at: A date specifying the period (month or year) to start the calendar in.
- start_view: The initial view used to select a date.
- previous_month_label: The accessible label given to the button used to move to the previous month.
- next_month_label: The accessible label given to the button used to move to the next month.
- previous_year_label: The accessible label given to the button used to move to the previous year.
- next_year_label: The accessible label given to the button used to move to the next year.
- previous_multi_year_label: The accessible label given to the button used to move to the previous 24 years.
- next_multi_year_label: The accessible label given to the button used to move to the next 24 years.
- clear_label: The label given to the button used clear the selected date and close the picker.
- confirm_label: The label given to the button used apply the selected date and close the picker.
- dismiss_label: The label given to the button used discard the selected date and close the picker.
- label: The label given to the the picker.

    pub opaque type Datepicker

# Values

## clear_label

</>

    pub fn clear_label(
      record: Datepicker,
      clear_label: String,
    ) -> Datepicker

clear_label sets the value of clear_label for this Datepicker.

## clearable

</>

    pub fn clearable(
      record: Datepicker,
      clearable: Clearable,
    ) -> Datepicker

clearable sets the value of clearable for this Datepicker.

## confirm_label

</>

    pub fn confirm_label(
      record: Datepicker,
      confirm_label: String,
    ) -> Datepicker

confirm_label sets the value of confirm_label for this Datepicker.

## date

</>

    pub fn date(
      record: Datepicker,
      date: option.Option(date.Date),
    ) -> Datepicker

date sets the value of date for this Datepicker.

## default_clear_label

</>

    pub const default_clear_label: String

## default_clearable

</>

    pub const default_clearable: Clearable

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_confirm_label

</>

    pub const default_confirm_label: String

## default_date

</>

    pub const default_date: option.Option(date.Date)

## default_dismiss_label

</>

    pub const default_dismiss_label: String

## default_label

</>

    pub const default_label: String

## default_max_date

</>

    pub const default_max_date: option.Option(date.Date)

## default_min_date

</>

    pub const default_min_date: option.Option(date.Date)

## default_next_month_label

</>

    pub const default_next_month_label: String

## default_next_multi_year_label

</>

    pub const default_next_multi_year_label: String

## default_next_year_label

</>

    pub const default_next_year_label: String

## default_previous_month_label

</>

    pub const default_previous_month_label: String

## default_previous_multi_year_label

</>

    pub const default_previous_multi_year_label: String

## default_previous_year_label

</>

    pub const default_previous_year_label: String

## default_range_end

</>

    pub const default_range_end: option.Option(date.Date)

## default_range_start

</>

    pub const default_range_start: option.Option(date.Date)

## default_start_at

</>

    pub const default_start_at: option.Option(date.Date)

## default_start_view

</>

    pub const default_start_view: calendar_view.CalendarView

## default_variant

</>

    pub const default_variant: datepicker_variant.DatepickerVariant

## dismiss_label

</>

    pub fn dismiss_label(
      record: Datepicker,
      dismiss_label: String,
    ) -> Datepicker

dismiss_label sets the value of dismiss_label for this Datepicker.

## from_config

</>

    pub fn from_config(config: Config) -> Datepicker

from_config creates a new Datepicker from the given configuration.

## label

</>

    pub fn label(record: Datepicker, label: String) -> Datepicker

label sets the value of label for this Datepicker.

## max_date

</>

    pub fn max_date(
      record: Datepicker,
      max_date: option.Option(date.Date),
    ) -> Datepicker

max_date sets the value of max_date for this Datepicker.

## min_date

</>

    pub fn min_date(
      record: Datepicker,
      min_date: option.Option(date.Date),
    ) -> Datepicker

min_date sets the value of min_date for this Datepicker.

## new

</>

    pub fn new() -> Datepicker

new creates a new Datepicker with the default configuration.

## next_month_label

</>

    pub fn next_month_label(
      record: Datepicker,
      next_month_label: String,
    ) -> Datepicker

next_month_label sets the value of next_month_label for this Datepicker.

## next_multi_year_label

</>

    pub fn next_multi_year_label(
      record: Datepicker,
      next_multi_year_label: String,
    ) -> Datepicker

next_multi_year_label sets the value of next_multi_year_label for this Datepicker.

## next_year_label

</>

    pub fn next_year_label(
      record: Datepicker,
      next_year_label: String,
    ) -> Datepicker

next_year_label sets the value of next_year_label for this Datepicker.

## previous_month_label

</>

    pub fn previous_month_label(
      record: Datepicker,
      previous_month_label: String,
    ) -> Datepicker

previous_month_label sets the value of previous_month_label for this Datepicker.

## previous_multi_year_label

</>

    pub fn previous_multi_year_label(
      record: Datepicker,
      previous_multi_year_label: String,
    ) -> Datepicker

previous_multi_year_label sets the value of previous_multi_year_label for this Datepicker.

## previous_year_label

</>

    pub fn previous_year_label(
      record: Datepicker,
      previous_year_label: String,
    ) -> Datepicker

previous_year_label sets the value of previous_year_label for this Datepicker.

## range_end

</>

    pub fn range_end(
      record: Datepicker,
      range_end: option.Option(date.Date),
    ) -> Datepicker

range_end sets the value of range_end for this Datepicker.

## range_start

</>

    pub fn range_start(
      record: Datepicker,
      range_start: option.Option(date.Date),
    ) -> Datepicker

range_start sets the value of range_start for this Datepicker.

## render

</>

    pub fn render(
      model: Datepicker,
      attributes: List(attribute.Attribute(msg)),
      children: List(element.Element(msg)),
    ) -> element.Element(msg)

render creates a Lustre Element for a Datepicker

## render_config

</>

    pub fn render_config(
      c: Config,
      attributes: List(attribute.Attribute(msg)),
      children: List(element.Element(msg)),
    ) -> element.Element(msg)

render_config creates a Lustre Element from a Datepicker Config

## start_at

</>

    pub fn start_at(
      record: Datepicker,
      start_at: option.Option(date.Date),
    ) -> Datepicker

start_at sets the value of start_at for this Datepicker.

## start_view

</>

    pub fn start_view(
      record: Datepicker,
      start_view: calendar_view.CalendarView,
    ) -> Datepicker

start_view sets the value of start_view for this Datepicker.

## variant

</>

    pub fn variant(
      record: Datepicker,
      variant: datepicker_variant.DatepickerVariant,
    ) -> Datepicker

variant sets the value of variant for this Datepicker.

✨