yew-datepicker

Crates.ioyew-datepicker
lib.rsyew-datepicker
version0.2.4
sourcesrc
created_at2023-11-20 09:20:27.91472
updated_at2023-12-21 14:47:17.835074
descriptionYew datepicker component
homepage
repositoryhttps://github.com/averichev/yew-datepicker
max_upload_size
id1041871
size16,852
(averichev)

documentation

README

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>
        }
    }
// ...
Commit count: 39

cargo fmt