2024-01-03 20:52:56 +08:00
|
|
|
# Calendar
|
|
|
|
|
|
|
|
```rust demo
|
2024-02-07 22:38:02 +08:00
|
|
|
use chrono::prelude::*;
|
2024-07-24 23:52:38 +08:00
|
|
|
let value = RwSignal::new(Local::now().date_naive());
|
|
|
|
let option_value = RwSignal::new(Some(Local::now().date_naive()));
|
2024-01-03 20:52:56 +08:00
|
|
|
|
|
|
|
view! {
|
2024-07-24 23:52:38 +08:00
|
|
|
<Space vertical=true>
|
|
|
|
<Calendar value />
|
|
|
|
<Calendar value=option_value />
|
|
|
|
</Space>
|
2024-01-03 20:52:56 +08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Calendar Props
|
|
|
|
|
2024-02-09 22:44:22 +08:00
|
|
|
| Name | Type | Default | Desciption |
|
|
|
|
| ----- | ----------------------------------- | -------------------- | ------------------------------------------- |
|
|
|
|
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the calendar element. |
|
|
|
|
| value | `Model<Option<NaiveDate>>` | `Default::default()` | Set the calendar value |
|