m3e/multi_year_view

MultiYearView is an internal component used to display a year selector 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

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

Values

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

active_date sets the value of active_date for this MultiYearView.

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

date sets the value of date for this MultiYearView.

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) -> MultiYearView

from_config creates a new MultiYearView from the given configuration.

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

max_date sets the value of max_date for this MultiYearView.

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

min_date sets the value of min_date for this MultiYearView.

pub fn new() -> MultiYearView

new creates a new MultiYearView with the default configuration.

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

render creates a Lustre Element for a MultiYearView

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

render_config creates a Lustre Element from a MultiYearView Config

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

today sets the value of today for this MultiYearView.

Search Document