fix(examples): fix calendar example

This commit is contained in:
Jax Young 2025-06-08 14:13:22 +08:00
parent 5b77f37fde
commit 410e23f431

View file

@ -3,7 +3,7 @@
//! Calendar widget example //! Calendar widget example
use chrono::NaiveDate; use chrono::{NaiveDate, Weekday};
use cosmic::app::{Core, Settings, Task}; use cosmic::app::{Core, Settings, Task};
use cosmic::widget::calendar::CalendarModel; use cosmic::widget::calendar::CalendarModel;
use cosmic::{executor, iced, ApplicationExt, Element}; use cosmic::{executor, iced, ApplicationExt, Element};
@ -92,6 +92,7 @@ impl cosmic::Application for App {
|date| Message::DateSelected(date), |date| Message::DateSelected(date),
|| Message::PrevMonth, || Message::PrevMonth,
|| Message::NextMonth, || Message::NextMonth,
Weekday::Sun,
); );
content = content.push(calendar); content = content.push(calendar);