Creating tasks at xPM are created at xAM #655

Closed
opened 2025-11-01 21:01:16 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @mechanarchy on GitHub (Oct 5, 2025).

Description

While the time parsing is correctly case insensitive here:
5f1d684551/frontend/src/helpers/time/parseDate.ts (L112-L113)

Later in the function you are specifically checking for pm and not handling PM:
5f1d684551/frontend/src/helpers/time/parseDate.ts (L121)

Vikunja Version

v0.24.6 and also on the demo site running v1.0.0-rc2-75-5f1d6845

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

Consequently the following example:
Image

Leads to
Image

Requiring the user to manually adjust the time from 05:00 back to 17:00 as desired.

Originally created by @mechanarchy on GitHub (Oct 5, 2025). ### Description While the time parsing is correctly case insensitive here: https://github.com/go-vikunja/vikunja/blob/5f1d684551fee62f8a2c299d206eb02045a5408d/frontend/src/helpers/time/parseDate.ts#L112-L113 Later in the function you are specifically checking for `pm` and not handling `PM`: https://github.com/go-vikunja/vikunja/blob/5f1d684551fee62f8a2c299d206eb02045a5408d/frontend/src/helpers/time/parseDate.ts#L121 ### Vikunja Version `v0.24.6` and also on the demo site running `v1.0.0-rc2-75-5f1d6845` ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots Consequently the following example: <img width="577" height="254" alt="Image" src="https://github.com/user-attachments/assets/e4b23ef5-5edc-4e58-8d12-406acfa4a2a3" /> Leads to <img width="577" height="698" alt="Image" src="https://github.com/user-attachments/assets/3b7a6da4-e460-4a99-9953-23558601d3a1" /> Requiring the user to manually adjust the time from `05:00` back to `17:00` as desired.
Author
Owner

@mechanarchy commented on GitHub (Oct 5, 2025):

Personally I also find it rather questionable that you specifically allow users to create tasks at times such as 8:5 am. The code currently interprets this as 8:05 am but I can think of no valid reasons to accept single-digit minute values.

5f1d684551/frontend/src/helpers/time/parseDate.ts (L112)

Specifically this part: (:[0-9][0-9]?)[0-9]?

@mechanarchy commented on GitHub (Oct 5, 2025): Personally I also find it rather questionable that you specifically allow users to create tasks at times such as `8:5 am`. The code currently interprets this as `8:05 am` but I can think of no valid reasons to accept single-digit minute values. https://github.com/go-vikunja/vikunja/blob/5f1d684551fee62f8a2c299d206eb02045a5408d/frontend/src/helpers/time/parseDate.ts#L112 Specifically this part: `(:[0-9][0-9]?)` &rarr; `[0-9]?`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#655