m3e/timepicker_input
TimepickerInput is a keyboard‑based time surface for choosing hours and minutes.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
format: timepicker_format.TimepickerFormat,
hide_labels: HideLabels,
hour: option.Option(Float),
max_time: option.Option(time_parts.TimeParts),
min_time: option.Option(time_parts.TimeParts),
minute: option.Option(Float),
second: option.Option(Float),
show_seconds: ShowSeconds,
orientation: timepicker_orientation.TimepickerOrientation,
period: timepicker_period.TimepickerPeriod,
view: timepicker_view.TimepickerView,
hour_label: String,
minute_label: String,
second_label: String,
period_toggle_label: String,
for: option.Option(String),
)
}
Constructors
-
Config( format: timepicker_format.TimepickerFormat, hide_labels: HideLabels, hour: option.Option(Float), max_time: option.Option(time_parts.TimeParts), min_time: option.Option(time_parts.TimeParts), minute: option.Option(Float), second: option.Option(Float), show_seconds: ShowSeconds, orientation: timepicker_orientation.TimepickerOrientation, period: timepicker_period.TimepickerPeriod, view: timepicker_view.TimepickerView, hour_label: String, minute_label: String, second_label: String, period_toggle_label: String, for: option.Option(String), )
HideLabels is whether to hide field labels.
pub type HideLabels {
IsHideLabels
IsNotHideLabels
}
Constructors
-
IsHideLabels -
IsNotHideLabels
ShowSeconds is whether to show seconds.
pub type ShowSeconds {
IsShowSeconds
IsNotShowSeconds
}
Constructors
-
IsShowSeconds -
IsNotShowSeconds
TimepickerInput is a View Model for this component
Fields:
- format: Whether to use a 12‑hour or 24‑hour clock.
- hide_labels: Whether to hide field labels.
- hour: The hour, in 24-hour time, from 0..23.
- max_time: The maximum time that can be selected.
- min_time: The minimum time that can be selected.
- minute: The minute, from 0..59.
- second: The second, from 0..59.
- show_seconds: Whether to show seconds.
- orientation: The orientation of the input.
- period: The 12-hour time period.
- view: The view used to input time.
- hour_label: The label for the hour field.
- minute_label: The label for the minute field.
- second_label: The label for the second field.
- period_toggle_label: The accessible label given to the period toggle.
- for: The identifier of the interactive control to which this element is attached.
pub opaque type TimepickerInput
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_for: option.Option(String)
pub const default_format: timepicker_format.TimepickerFormat
pub const default_hide_labels: HideLabels
pub const default_hour: option.Option(Float)
pub const default_hour_label: String
pub const default_max_time: option.Option(time_parts.TimeParts)
pub const default_min_time: option.Option(time_parts.TimeParts)
pub const default_minute: option.Option(Float)
pub const default_minute_label: String
pub const default_orientation: timepicker_orientation.TimepickerOrientation
pub const default_period: timepicker_period.TimepickerPeriod
pub const default_period_toggle_label: String
pub const default_second: option.Option(Float)
pub const default_second_label: String
pub const default_show_seconds: ShowSeconds
pub const default_view: timepicker_view.TimepickerView
pub fn for(
record: TimepickerInput,
for: option.Option(String),
) -> TimepickerInput
for sets the value of for for this TimepickerInput.
pub fn format(
record: TimepickerInput,
format: timepicker_format.TimepickerFormat,
) -> TimepickerInput
format sets the value of format for this TimepickerInput.
pub fn from_config(config: Config) -> TimepickerInput
from_config creates a new TimepickerInput from the given configuration.
pub fn hide_labels(
record: TimepickerInput,
hide_labels: HideLabels,
) -> TimepickerInput
hide_labels sets the value of hide_labels for this TimepickerInput.
pub fn hour(
record: TimepickerInput,
hour: option.Option(Float),
) -> TimepickerInput
hour sets the value of hour for this TimepickerInput.
pub fn hour_label(
record: TimepickerInput,
hour_label: String,
) -> TimepickerInput
hour_label sets the value of hour_label for this TimepickerInput.
pub fn max_time(
record: TimepickerInput,
max_time: option.Option(time_parts.TimeParts),
) -> TimepickerInput
max_time sets the value of max_time for this TimepickerInput.
pub fn min_time(
record: TimepickerInput,
min_time: option.Option(time_parts.TimeParts),
) -> TimepickerInput
min_time sets the value of min_time for this TimepickerInput.
pub fn minute(
record: TimepickerInput,
minute: option.Option(Float),
) -> TimepickerInput
minute sets the value of minute for this TimepickerInput.
pub fn minute_label(
record: TimepickerInput,
minute_label: String,
) -> TimepickerInput
minute_label sets the value of minute_label for this TimepickerInput.
pub fn new() -> TimepickerInput
new creates a new TimepickerInput with the default configuration.
pub fn orientation(
record: TimepickerInput,
orientation: timepicker_orientation.TimepickerOrientation,
) -> TimepickerInput
orientation sets the value of orientation for this TimepickerInput.
pub fn period(
record: TimepickerInput,
period: timepicker_period.TimepickerPeriod,
) -> TimepickerInput
period sets the value of period for this TimepickerInput.
pub fn period_toggle_label(
record: TimepickerInput,
period_toggle_label: String,
) -> TimepickerInput
period_toggle_label sets the value of period_toggle_label for this TimepickerInput.
pub fn render(
model: TimepickerInput,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a TimepickerInput
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a TimepickerInput Config
pub fn second(
record: TimepickerInput,
second: option.Option(Float),
) -> TimepickerInput
second sets the value of second for this TimepickerInput.
pub fn second_label(
record: TimepickerInput,
second_label: String,
) -> TimepickerInput
second_label sets the value of second_label for this TimepickerInput.
pub fn show_seconds(
record: TimepickerInput,
show_seconds: ShowSeconds,
) -> TimepickerInput
show_seconds sets the value of show_seconds for this TimepickerInput.
pub fn view(
record: TimepickerInput,
view: timepicker_view.TimepickerView,
) -> TimepickerInput
view sets the value of view for this TimepickerInput.