2024-01-03 20:52:56 +08:00
|
|
|
# Date Picker
|
|
|
|
|
|
|
|
```rust demo
|
2024-02-07 22:38:02 +08:00
|
|
|
use chrono::prelude::*;
|
2024-01-03 20:52:56 +08:00
|
|
|
let value = create_rw_signal(Some(Local::now().date_naive()));
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<DatePicker value/>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### DatePicker Props
|
|
|
|
|
|
|
|
| Name | Type | Default | Desciption |
|
|
|
|
| --- | --- | --- | --- |
|
2024-02-09 22:44:22 +08:00
|
|
|
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the date picker element. |
|
|
|
|
| value | `Model<Option<NaiveDate>>` | `Default::default()` | Set the date picker value |
|
2024-01-03 20:52:56 +08:00
|
|
|
| attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. |
|