m3e/year_view

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

This file was generated by m3e/generator

     DO NOT EDIT

Types

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

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

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

active_date sets the value of active_date for this YearView.

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

date sets the value of date for this YearView.

pub const default_active_date: date.Date
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_max_date: option.Option(date.Date)
pub const default_min_date: option.Option(date.Date)
pub const default_today: date.Date
pub fn from_config(config: Config) -> YearView

from_config creates a new YearView from the given configuration.

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

max_date sets the value of max_date for this YearView.

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

min_date sets the value of min_date for this YearView.

pub fn new() -> YearView

new creates a new YearView with the default configuration.

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

render creates a Lustre Element for a YearView

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

render_config creates a Lustre Element from a YearView Config

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

today sets the value of today for this YearView.

Search Document