pub struct EuvCalendarProps {
pub title: &'static str,
pub weekdays: Vec<EuvCalendarWeekday>,
pub days: Vec<EuvCalendarDay>,
pub selected: Signal<u32>,
pub on_day_click: Option<Rc<dyn Fn(u32, bool)>>,
}Expand description
Props for the euv_calendar component.
The component renders only what it is given: weekdays drives the header
row and days the grid. No date is computed here.
Fields§
§title: &'static strThe month caption rendered in the header row.
weekdays: Vec<EuvCalendarWeekday>The column headings, in display order.
days: Vec<EuvCalendarDay>The day cells, in display order.
selected: Signal<u32>The currently selected day number.
on_day_click: Option<Rc<dyn Fn(u32, bool)>>The callback a click on a day cell runs.
The calendar resolves no date of its own, so the cell hands the day
number and whether the cell belongs to a neighbouring month to this
callback and leaves the date arithmetic to the caller. When it is
absent the cell writes its day number into selected instead.
Trait Implementations§
Source§impl Clone for EuvCalendarProps
impl Clone for EuvCalendarProps
Source§impl Debug for EuvCalendarProps
impl Debug for EuvCalendarProps
Auto Trait Implementations§
impl !RefUnwindSafe for EuvCalendarProps
impl !Send for EuvCalendarProps
impl !Sync for EuvCalendarProps
impl !UnwindSafe for EuvCalendarProps
impl Freeze for EuvCalendarProps
impl Unpin for EuvCalendarProps
impl UnsafeUnpin for EuvCalendarProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more