emilk / emilk/egui

Issue with datepicker: auto-closing of the calendar when it’s not supposed to

Open
#7,461 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

OS:
Linux Aurora 42
KDE Plasma version 6.4.4

The app is run as native app

```
[dependencies]
eframe = "0.32.1"
egui_extras = { version = "0.32.1", features = ["svg","image","datepicker"] }
```

There seems to be an issue with the date picker. If you click on it, and select the year drop down button, and select a year, the date picker will close off automatically instead of remaining open. Its the same for when you choose the day or the month.

However this does not happen if you use the lower buttons or if you pick a date on the calendar itself. The automatic closing also doesn't not seem to auto save the value.

Image

Quick example code(i am aware the save function won't work here):
```
TopBottomPanel::top("test_panel").show(ctx, |ui| {
let mut test = NaiveDate::default();
ui.add(
DatePickerButton::new(&mut test)
.id_salt("test")
);
});
```

![Image](https://github.com/user-attachments/assets/5c038a41-244e-4ab8-aa79-ab439b9e53eb)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the DatePickerButton example using egui_extras 0.32.1 on a native Linux app. Check the year, month, and day dropdown selections separately from the lower buttons and calendar; done means selections keep the date picker open and the chosen value is saved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.