8 releases
0.2.4 | Dec 21, 2023 |
---|---|
0.2.3 | Dec 20, 2023 |
0.1.2 | Dec 5, 2023 |
0.1.0 | Nov 20, 2023 |
#221 in Date and time
13KB
264 lines
yew-datepicker
# ...
yew-datepicker = "0.2.0"
chrono = "0.4.31"
pure-rust-locales = "0.7.0"
# ...
use chrono::NaiveDate;
use gloo_console::log;
use pure_rust_locales::Locale;
use yew_datepicker::Datepicker;
// ...
fn view(&self, _ctx: &Context<Self>) -> Html {
let on_select = move |date: NaiveDate| {
log!(date.format("%d.%m.%Y").to_string());
};
let locale = Locale::en_US;
html! {
<div>
<h1>{ "This is yew-datepicker usage example" }</h1>
<Datepicker {on_select} {locale} />
</div>
}
}
// ...
Dependencies
~16–25MB
~335K SLoC