Bug 465674 - Do not require a leading "0" for time of the day
Summary: Do not require a leading "0" for time of the day
Status: RESOLVED FIXED
Alias: None
Product: Merkuro
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.12.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Claudio Cambra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-13 16:34 UTC by Riccardo Robecchi
Modified: 2023-03-29 15:19 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2023-02-13 16:34:07 UTC
SUMMARY
When creating or editing an event, Kalendar currently requires to input the time in full four-digit format. This means that "8" or "5" are not accepted as valid input in the hour section, therefore requiring the user to input a leading 0 ("08", "05"). There is no indication whatsoever that this is the issue, though, so the user just finds themselves with the input being reset without any explanation. Given that it is quite common to indicate time without the leading 0, it would be preferable (if not even sensible) to treat single-digit input in the hour section as having a leading 0 by default.

STEPS TO REPRODUCE
1. Create or edit an event.
2. In the time section, input the hour as a single digit.

OBSERVED RESULT
The input is rejected.

EXPECTED RESULT
The input is automatically adjusted to Kalendar's internal format with a leading 0.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-02-21 22:14:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kalendar/-/merge_requests/312
Comment 2 Claudio Cambra 2023-02-22 22:25:48 UTC
Git commit 11e9cdeca165e3833e65b0669997aa7146264c65 by Claudio Cambra, on behalf of Vanshpreet S Kohli.
Committed on 22/02/2023 at 22:25.
Pushed by clau-cambra into branch 'master'.

Do not require leading "0" for hours while creating event

Issue : When creating or editing an event, Kalendar currently requires to input the time in full four-digit format. This means that "8" or "5" are not accepted as valid input in the hour section, therefore requiring the user to input a leading 0 ("08", "05"). There is no indication whatsoever that this is the issue, though, so the user just finds themselves with the input being reset without any explanation.

Solution: Treat single-digit input in the hours section as having a leading zero by default

M  +4    -1    src/contents/ui/Controls/DateControls/TimeCombo.qml

https://invent.kde.org/pim/kalendar/commit/11e9cdeca165e3833e65b0669997aa7146264c65
Comment 3 Riccardo Robecchi 2023-03-29 15:19:48 UTC
Which version should contain this fix?