Bug 507964 - increment/decrement issue with date field widget
Summary: increment/decrement issue with date field widget
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (other bugs)
Version First Reported In: 5.2.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-07 03:56 UTC by b3+bugs-kde-org
Modified: 2025-08-17 04:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.2.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description b3+bugs-kde-org 2025-08-07 03:56:08 UTC
SUMMARY
OBSERVED RESULT

With the date field of previous versions of kmymoney, the ("=" or "+") and "-" characters increment and decrement the date, respectively.  In the current version, only the "+" character increments the date. The current behavior is much more inconvenient when entering many transactions as the shift key is required to increment the date, but not used to decrement the date.

EXPECTED RESULT

The "=" character as well as the "+" character should increment the date.

ADDITIONAL COMMENTARY

The arrow keys can also be used to increment/decrement the day, month, or year according to where the cursor is placed in the date field. These keys, though, stop at the end and start of the month when incrementing and decrementing the day, and stop and the end and start of the year when incrementing and decrementing the month. Both the old version (5.1.3) and current version (5.2.1) operate in this fashion. 

When entering many transactions, I think the date widget would be more useful if the arrow keys would increment and decrement beyond the current month and year. That is incrementing the day past the end of the month would move the date to the start of the next month, and decrementing the day before the start of the current month would move the date to the end of the previous month. Likewise, incrementing the month past the end of the year would move the date to January of the next year and decrementing the month before the start of the year would move the date to December of the previous year. (Perhaps this should be a separate wishlist bug report.)

SOFTWARE/OS VERSIONS

KMyMoney: 5.2.1-c3d3f7e (kmymoney-5.2-4600-linux-gcc-x86_64.AppImage)
Alkimia: 8.2.70 (build against 8.2.70)
Aqbanking: Unknown (build against 6.6.1)
Gpgme: Unknown (build against 1.23.2)
Gwenhywfar: Unknown (build against 5.12.1)
KDiagram: Unknown (build against )
libical: Unknown (build against 3.0.9)
libofx: Unknown (build against 7.0.4)
SQLCipher: Unknown (build against 3.20.1)
KDE Frameworks: 6.16.0
Qt: Using 6.8.3 and built against 6.8.3
Debian GNU/Linux 13 (trixie) (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.12.38+deb13-amd64
Comment 1 Jack 2025-08-14 21:58:54 UTC
When I use those keys to alter the date, I use the keypad, so shift is not necessary.  
The +/- keys (with or without =) behaving differently from the arrow keys is intentional, but I have not idea if changing the arrow keys to also wrap past boundaries would be accepted.
I can confirm that the = key does not decrement (compiled from git master) and it does work for me with a 5.1.3 appimage.  Note, however that the new version uses Qt6 and the old 5.1.3 uses Qt5.
The code only explicitly recognizes plus and minus, so I suspect that the acceptance of equals was an unintended (if desirable and useful) effect of something deep within Qt5 which was changed in Qt6.  There was no explicit change in KMyMoney regarding this behavior (at least none that I can find.)
Perhaps this could be considered a wishlist to explicitly allow the equals key to increment the field the same way the plus key does.  While it looks to me like the required code change would be very easy, I have no idea what side effects or unintended consequences there might be.  Remember - not all users have the same keyboard layout, with + and = on the same key.
Comment 2 b3+bugs-kde-org 2025-08-15 06:40:32 UTC
Sigh. I've been using kmymoney for almost 20 years. Updating from version 1 to version 5.0 (about 3 years ago) was challenging due to a host of database conversion issues. After these issues were sorted, the most productivity sapping "feature" was that the data widget changed -- rather than bump the day, the "-" and "=" keys bumped the day, month, or year depending on where in the date the cursor was positioned.  Now with version 5.2, entering dates changes again -- this time in an even more disruptive way for (I'm guessing) many users (see bug report 506399 and this bug report).

To Jack's comment: Using the keypad may work for some, but most laptops do not have a separate keypad, so the keypad workaround is not a good solution. Characters "+" and "=" not being on the same key for some keyboard layouts is a good point -- in this case, though, I contend that it is much less disruptive to have an additional key ("=") increment the date, than to change the original behavior for those of us with "=" and "+" characters on the same key.  Finally, I suggested altering the date's arrow key behavior to restore the behavior lost from 5.1.3 (see bug report 506399) albeit with the arrow keys rather than the "-" and "+"/"=" keys. Not perfect, but a workable solution, I think.

Version 5.2.1 has lots of good changes and fixes -- let's make entering and adjusting dates a simple as it once was.
Comment 3 Thomas Baumgart 2025-08-16 15:04:27 UTC
Git commit e62002f7944be518747f4ae81010c15302be7296 by Thomas Baumgart.
Committed on 16/08/2025 at 15:02.
Pushed by tbaumgart into branch 'master'.

Allow the equal key to increment the date like the plus key

The plus and minus key can be used to adjust the date by one day in each
direction. On many keyboard layouts, the plus key can only be reached by
pressing it together with the shift modifier. In those cases, on most
keyboard layouts one finds the plus being on the same key as the equal
sign.

In the KMyMoney 5.1 series the equal key therefore also incremented the
date by one day. This change brings back that functionality which was
lost during the transition to the new date widget.
FIXED-IN: 5.2.2

M  +2    -1    kmymoney/widgets/kmymoneydateedit.cpp

https://invent.kde.org/office/kmymoney/-/commit/e62002f7944be518747f4ae81010c15302be7296
Comment 4 Thomas Baumgart 2025-08-17 04:47:49 UTC
Git commit 489074ea475041cfbfb176020c2bc79c987974ca by Thomas Baumgart.
Committed on 16/08/2025 at 15:04.
Pushed by tbaumgart into branch '5.2'.

Allow the equal key to increment the date like the plus key

The plus and minus key can be used to adjust the date by one day in each
direction. On many keyboard layouts, the plus key can only be reached by
pressing it together with the shift modifier. In those cases, on most
keyboard layouts one finds the plus being on the same key as the equal
sign.

In the KMyMoney 5.1 series the equal key therefore also incremented the
date by one day. This change brings back that functionality which was
lost during the transition to the new date widget.
FIXED-IN: 5.2.2
(cherry picked from commit e62002f7944be518747f4ae81010c15302be7296)

M  +2    -1    kmymoney/widgets/kmymoneydateedit.cpp

https://invent.kde.org/office/kmymoney/-/commit/489074ea475041cfbfb176020c2bc79c987974ca