m3e/datepicker

Datepicker is presents a date picker on a temporary surface.

This file was generated by m3e/generator

     DO NOT EDIT

Types

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

pub type Clearable {
  IsClearable
  IsNotClearable
}

Constructors

  • IsClearable
  • IsNotClearable

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

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

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

clear_label sets the value of clear_label for this Datepicker.

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

clearable sets the value of clearable for this Datepicker.

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

confirm_label sets the value of confirm_label for this Datepicker.

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

date sets the value of date for this Datepicker.

pub const default_clear_label: String
pub const default_clearable: Clearable
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_confirm_label: String
pub const default_dismiss_label: String
pub const default_label: String
pub const default_max_date: option.Option(date.Date)
pub const default_min_date: option.Option(date.Date)
pub const default_next_month_label: String
pub const default_next_multi_year_label: String
pub const default_next_year_label: String
pub const default_previous_month_label: String
pub const default_previous_multi_year_label: String
pub const default_previous_year_label: String
pub const default_range_end: option.Option(date.Date)
pub const default_range_start: option.Option(date.Date)
pub const default_start_at: option.Option(date.Date)
pub fn dismiss_label(
  record: Datepicker,
  dismiss_label: String,
) -> Datepicker

dismiss_label sets the value of dismiss_label for this Datepicker.

pub fn from_config(config: Config) -> Datepicker

from_config creates a new Datepicker from the given configuration.

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

label sets the value of label for this Datepicker.

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

max_date sets the value of max_date for this Datepicker.

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

min_date sets the value of min_date for this Datepicker.

pub fn new() -> Datepicker

new creates a new Datepicker with the default configuration.

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.

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.

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.

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.

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.

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.

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

range_end sets the value of range_end for this Datepicker.

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

range_start sets the value of range_start for this Datepicker.

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

render creates a Lustre Element for a Datepicker

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

render_config creates a Lustre Element from a Datepicker Config

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

start_at sets the value of start_at for this Datepicker.

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

start_view sets the value of start_view for this Datepicker.

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

variant sets the value of variant for this Datepicker.

Search Document