mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-24 06:49:21 -05:00
22 lines
721 B
Markdown
22 lines
721 B
Markdown
# Date Picker
|
|
|
|
```rust demo
|
|
use chrono::prelude::*;
|
|
let value = RwSignal::new(Local::now().date_naive());
|
|
let option_value = RwSignal::new(Some(Local::now().date_naive()));
|
|
|
|
view! {
|
|
<Space vertical=true>
|
|
<DatePicker value/>
|
|
<DatePicker value=option_value/>
|
|
</Space>
|
|
}
|
|
```
|
|
|
|
### DatePicker Props
|
|
|
|
| Name | Type | Default | Desciption |
|
|
| --- | --- | --- | --- |
|
|
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the date picker element. |
|
|
| value | `Model<Option<NaiveDate>>` | `Default::default()` | Set the date picker value |
|
|
| attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. |
|