Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to add activities in HHmm format (without colon) #4723

Open
darioackermann opened this issue Mar 25, 2024 · 10 comments
Open

Possibility to add activities in HHmm format (without colon) #4723

darioackermann opened this issue Mar 25, 2024 · 10 comments
Milestone

Comments

@darioackermann
Copy link

darioackermann commented Mar 25, 2024

Describe the problem

I'm a fan of using my numeric keypad to enter my hours into kimai and I'd love to be able to "speed-fill" my form by entering the start / end hour in the format HHmm (i.e., 1600 instead of 16:00).

Describe the solution you'd like

Possibility to add times in the format HHmm

Describe alternatives you've considered

No response

Screenshots

image

Additional info

If this has a chance of getting merged, I am happy to propose a PR for this.

@ckuetbach
Copy link

If I remember correctly, this was possible in Kimai 1.x

@darioackermann
Copy link
Author

Thanks for linking to the other issue, I'll close this here as duplicate.

@darioackermann darioackermann closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@ckuetbach
Copy link

I'm not sure, if the other issue is a direct duplicate. I linked them because I expect the fix to be at the same point in the sources and could probably be fixed together.

@kevinpapst kevinpapst reopened this Mar 25, 2024
@kevinpapst
Copy link
Member

Same but different => re-open

@ckuetbach
Copy link

I try to figure out, where the regular expression to check the format is created. (As I suspect a missing or wrong regex to be the cause).

This pattern: pattern="([0-9]|[01][0-9]|2[0-3]):([0-5][0-9])"

<input type="text" id="timesheet_edit_form_end_time" name="timesheet_edit_form[end_time]" pattern="([0-9]|[01][0-9]|2[0-3]):([0-5][0-9])" autocomplete="off" data-timepicker="on" data-format="HH:mm" placeholder="HH:mm" class="form-control">```

@joho1968
Copy link
Contributor

joho1968 commented Apr 3, 2024

I think it'd be wiser to try to do what I suggest in #4707 (comment) instead of coming up with a working regex; they're messy at best and probably won't do away with backend parsing/validation anyway ... :think

@ckuetbach
Copy link

ckuetbach commented Apr 3, 2024

Currently it is validated by that regex in the browser.

I'd like to remove or fix the pattern of the regular expression, because it causes my issues with the entry format. But I can't find the source code which causes the regex to be rendered into the patter attribute if the input field.

@MartinRyx
Copy link

MartinRyx commented Apr 10, 2024

I think it would be great to allow both 1700 and 17.00 and on lost focus parse and change to 17:00

@ebdavison
Copy link

This would definitely be great to have and be able to enter 1830 instead of 6:30 PM. Much easier on the numpad data entry muscles.

@kevinpapst
Copy link
Member

be able to enter 1830 instead of 6:30 PM

Ah, the input is currently locale aware. So displaying and entering the time expects the same format.
That should be improved, probably its good to support both 12 and 24 hour format at the same time.

@kevinpapst kevinpapst modified the milestones: Planned features, 2.17 Apr 30, 2024
@kevinpapst kevinpapst modified the milestones: 2.17, 2.18 May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants