common/date-chooser: Jump to first day of month on button press

Encode the day in the combined choice value and use the callbacks
introduced in the previous commit to always jump to the first day
of the month when the next/previous month buttons are clicked.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1103
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/369>
This commit is contained in:
Fabian Hügel
2026-02-21 20:22:34 -05:00
committed by Hari Rana
parent 8af5298e50
commit 66a8c6b7ab
2 changed files with 96 additions and 23 deletions
+4 -2
View File
@@ -41,8 +41,10 @@ template $GcalDateChooser: Adw.Bin {
$GcalMultiChoice combined_choice {
visible: bind $get_combined_choice_visible(template.show-heading, template.split-month-year) as <bool>;
halign: fill;
min-value: 12;
max-value: 119999;
// From January 1st, 1 (32 * (1 * 12 + 0) + 0):
min-value: 384;
// …to December 31st, 9999 (32 * (9999×12+11) + 30):
max-value: 3839998;
popover: popover;
animate: false;
value: 0;