Closed zaanposni closed 10 months ago
Hi @KevinWardProf
checkout this file at line 590. (same applies to the EditCase.svelte in the same directory)
This regex is wrong. I want this timepicker to allow 00:00 to 23:59 as valid time inputs. However, it marks 20:00 and similar stuff as invalid. Furthermore 29:00 is marked as a valid time.
If this time is omitted, the form and therefore the web request generates completely wrong resources. If the time is not set correctly to the backend, it is instead replaced with null which is wrong. I want the time field to be optional. If the user enters a date but no time or an invalid time I want the time to default to 12hours or similar.
Let me know if you want to work on this issue so I can assign it to you.
Hi, I think that this regular expression matches your wishes: /^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/
I could try to fix the other problems you are talking about tomorrow.
I'm sorry, made a mistake. This should be the correct regex: /^([01]\d|2[0-3]):[0-5]\d$/
I can make a pull request to change the current regex to the new one, and try to fix the issues with the time being set to null.
Sounds good, feel free to go ahead.
Please target the release/3.5.0
branch.
fixed in 3.5.0
Hey @zaanposni Could you provide a better description of the problem?