Recipe can now be scheduled

This commit is contained in:
Greg Burri 2025-02-04 22:29:56 +01:00
parent ae6da1a5ae
commit fbef990022
18 changed files with 233 additions and 51 deletions

View file

@ -18,7 +18,7 @@ struct CalendarStateInternal {
}
#[derive(Clone)]
struct CalendarState {
pub struct CalendarState {
internal_state: Rc<RefCell<CalendarStateInternal>>,
}
@ -56,7 +56,7 @@ impl CalendarState {
}
}
pub fn setup(calendar: Element) {
pub fn setup(calendar: Element) -> CalendarState {
let prev: Element = calendar.selector(".prev");
let next: Element = calendar.selector(".next");
@ -98,6 +98,8 @@ pub fn setup(calendar: Element) {
}
})
.forget();
state
}
const NB_CALENDAR_ROW: u64 = 5;