patternfly_dioxus/datepicker.rs
1use dioxus::prelude::*;
2
3#[allow(non_snake_case)]
4#[inline_props]
5pub fn PfDatePicker<'a>(cx: Scope<'a>, date: &'a UseState<String>) -> Element {
6 cx.render(rsx! {
7 div{ class: "pf-c-date-picker",
8 div { class: "pf-c-datepicker__input",
9 div { class: "pf-c-input-group",
10 input { class: "pf-c-form-control", r#type: "date", value: "{date}", aria_label: "Date picker",onchange: move |e| { date.set(e.value.to_string()); }, }
11
12 }
13 }
14 }
15 })
16}
17