Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
/ egui-datepicker Public archive

This library provide simple date picker widget for egui

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

shadr/egui-datepicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is abandoned

I lost interest and need in date picker for egui library. You can use date picker from egui_extras, it's more featurefull and maintained. If you want take the name on crates.io feel free to message me.

egui-datepicker

Latest version

This library provide a simple date picker widget for egui with some customization. Checkout the gif to see widget in action!

⚡️ Quickstart

Add egui-datepicker as dependency to your project

[dependencies]
egui-datepicker = "0.3"

Import necessary structs

use egui_datepicker::{DatePicker, Date, Utc};

or if you already include chrono in your project

use egui_datepicker::DatePicker;
use chrono::{Date, offset::Utc};

Add date field with selected time offset in app struct

struct MyApp {
    date: Date<Utc>,
}

Add widget in update function

fn update(/*snip*/) {
    /*snip*/
    ui.add(DatePicker::new("datepicker-unique-id", &mut self.date));
    /*snip*/
}

👀 Customization

You can set first day of week to sunday with

DatePicker::new(/*snip*/).sunday_first(true)

Make popup window movable

DatePicker::new(/*snip*/).movable(true)

Set different date format

DatePicker::new(/*snip*/).date_format("%d/%m/%Y")

⚠️ License

egui-datepicker is licensed under MIT OR Apache-2.0

About

This library provide simple date picker widget for egui

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages