Crates.io | yew-datepicker |
lib.rs | yew-datepicker |
version | 0.2.4 |
source | src |
created_at | 2023-11-20 09:20:27.91472 |
updated_at | 2023-12-21 14:47:17.835074 |
description | Yew datepicker component |
homepage | |
repository | https://github.com/averichev/yew-datepicker |
max_upload_size | |
id | 1041871 |
size | 16,852 |
# ...
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>
}
}
// ...