# m3e/year_view

YearView is an internal component used to display a single year in a calendar.

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

         DO NOT EDIT

# Types

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        today: date.Date,
        date: option.Option(date.Date),
        active_date: date.Date,
        min_date: option.Option(date.Date),
        max_date: option.Option(date.Date),
      )
    }

### Constructors

-     Config(
        today: date.Date,
        date: option.Option(date.Date),
        active_date: date.Date,
        min_date: option.Option(date.Date),
        max_date: option.Option(date.Date),
      )

## YearView

opaque </>

YearView is a View Model for this component

## Fields:

- today: Today’s date.
- date: The selected date.
- active_date: The active date.
- min_date: The minimum date that can be selected.
- max_date: The maximum date that can be selected.

    pub opaque type YearView

# Values

## active_date

</>

    pub fn active_date(
      record: YearView,
      active_date: date.Date,
    ) -> YearView

active_date sets the value of active_date for this YearView.

## date

</>

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

date sets the value of date for this YearView.

## default_active_date

</>

    pub const default_active_date: date.Date

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

</>

    pub const default_today: date.Date

## from_config

</>

    pub fn from_config(config: Config) -> YearView

from_config creates a new YearView from the given configuration.

## max_date

</>

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

max_date sets the value of max_date for this YearView.

## min_date

</>

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

min_date sets the value of min_date for this YearView.

## new

</>

    pub fn new() -> YearView

new creates a new YearView with the default configuration.

## render

</>

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

render creates a Lustre Element for a YearView

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

## today

</>

    pub fn today(record: YearView, today: date.Date) -> YearView

today sets the value of today for this YearView.

✨