Skip to main content

orbital_base_components/form/datetime/
picker_shortcut.rs

1use super::OrbitalDateTime;
2
3/// Shortcut preset shown on calendar/picker shortcut bars.
4#[derive(Clone, Debug, PartialEq, Eq)]
5pub struct PickerShortcut {
6    pub label: String,
7    pub value: OrbitalDateTime,
8}
9
10impl PickerShortcut {
11    pub fn new(label: impl Into<String>, value: OrbitalDateTime) -> Self {
12        Self {
13            label: label.into(),
14            value,
15        }
16    }
17}