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

#201 in Date and time

Download history 14/week @ 2024-02-27 2/week @ 2024-03-26 41/week @ 2024-04-02 1/week @ 2024-04-23 269/week @ 2024-04-30

111 downloads per month

MIT/Apache

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

~15–24MB
~324K SLoC