-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix "Typing in date input ends early" #1084
base: main
Are you sure you want to change the base?
Conversation
Trying to type in a date in for example the start date table filter is not working. The input is interpreted as a date immediately. For example, typing "1" will result in "01/01/2025", even if you wanted to type something completely different. This patch fixes that by enabling strict parsing. Arguably not the best solution, but it works for now.
Use Run test server using develop.opencast.org as backend:
Specify a different backend like stable.opencast.org:
It may take a few seconds for the interface to spin up. |
This pull request is deployed at test.admin-interface.opencast.org/1084/2025-01-23_11-52-45/ . |
At first the date input seems to be working fine on main. But there are a couple of weird things when trying different things. As you already noted, enabling strict mode isn't a great solution, and I expect users might complain about that even more than the current status if they don't know that they need to strictly adhere to the rules of their respective date format (i.e. with German as selected language, users need to type "dd.mm.yyyy", with English(US) they need to type "mm/dd/yyyy", while English(UK) allows both "dd.mm.yyyy" and "dd/mm/yyyy")). These were the only languages I tested. So yeah, I don't know what the best solution for this is either. Maybe this is something to bring up in technical meeting, but I don't feel up to the task of explaining exactly everything that is wrong with the current version. |
To summarize your words in my own:
Fair enough, I definitely agree that forcing users to correctly know the default date scheme for the currently selected language is not great UX. I still believe that being forced to adhere to date schemes is better than not being able to type in the date at all.
There are multiple ways we could act on that statement, but without a more detailed info on what you are talking about it is hard to say. Are those issues worth fixing? Was introducing |
TLDR: just go with strict mode for now Ok, I'll try to list the "issues" I have with the current status of this on main (which are more or less subjective). I'm afraid that it might be a little hard to follow and it won't be a complete list, but I'll do my best. I will focus on the start date filter, assuming this applies to other instances of the date picker as well. All of these observations are made with a freshly instantiated filter on the main branch and if not specified otherwise, they happen in both Chrome and Firefox:
The following observations are made with German as selected language:
Repeating similar tests with English(US) selected:
Finally, looking at English(UK):
If I understand you correctly, it is not possible for you to enter any date at all, but that specific behaviour I cannot reproduce. However, that being the case for you, it's safe to assume this applies to other people as well, and under that assumption I agree that using strict mode is preferable. And at any rate, I don't think the issues I listed above can be easily fixed. Also, others might not perceive or notice them as issues at all. My original comment was more to say that I don't feel comfortable to decide this on my own. Though I am leaning towards saving the one making the decision (and I think it's fair if you do that) the headache of trying to make this work without strict mode, and suggesting to go ahead and merge this. If you agree, I'll gladly approve this. |
Trying to type in a date in for example the start date table filter is not working. The input is interpreted as a date immediately. For example, typing "1" will result in "01/01/2025", even if you wanted to type something completely different.
This patch fixes that by enabling strict parsing. Arguably not the best solution, but it works for now.