# m3e/calendar

Calendar is a calendar used to select a date.

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

         DO NOT EDIT

# Types

## Calendar

opaque </>

Calendar is a View Model for this component

## Fields:

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

    pub opaque type Calendar

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        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,
      )
    }

### Constructors

-     Config(
        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,
      )

## Slot

</>

Slots are used in child elements to insert content into this component

    pub type Slot {
      Header
    }

### Constructors

-     Header

# Values

## date

</>

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

date sets the value of date for this Calendar.

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_date

</>

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

## 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

## from_config

</>

    pub fn from_config(config: Config) -> Calendar

from_config creates a new Calendar from the given configuration.

## max_date

</>

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

max_date sets the value of max_date for this Calendar.

## min_date

</>

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

min_date sets the value of min_date for this Calendar.

## new

</>

    pub fn new() -> Calendar

new creates a new Calendar with the default configuration.

## next_month_label

</>

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

next_month_label sets the value of next_month_label for this Calendar.

## next_multi_year_label

</>

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

next_multi_year_label sets the value of next_multi_year_label for this Calendar.

## next_year_label

</>

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

next_year_label sets the value of next_year_label for this Calendar.

## previous_month_label

</>

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

previous_month_label sets the value of previous_month_label for this Calendar.

## previous_multi_year_label

</>

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

previous_multi_year_label sets the value of previous_multi_year_label for this Calendar.

## previous_year_label

</>

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

previous_year_label sets the value of previous_year_label for this Calendar.

## range_end

</>

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

range_end sets the value of range_end for this Calendar.

## range_start

</>

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

range_start sets the value of range_start for this Calendar.

## render

</>

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

render creates a Lustre Element for a Calendar

## 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 Calendar Config

## slot

</>

    pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

## start_at

</>

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

start_at sets the value of start_at for this Calendar.

## start_view

</>

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

start_view sets the value of start_view for this Calendar.

✨