-
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
Replace MUI DatePicker with react-datepicker #986
base: main
Are you sure you want to change the base?
Conversation
Fixes several issues with date picking. react-datepicker allows date-range-picking and makes it therefore easier to handle date picking.
…diting Fixes several issues with date picking. react-datepicker allows date-range-picking and makes it therefore easier to handle date picking.
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/986/2024-11-29_13-23-18/ . |
I looked into the above mentioned link. Selecting dates in the Startdate-filter, event-schedule and event-metadata works fine. Would it be possible to focus the datepicker when it is opened - having the focus allows navigation with i.e. cursor-keys and pgup/pgdown. Getting the focus manually needs some learning as the picker closes on single-click, tab closes the picker. |
This pull request is deployed at test.admin-interface.opencast.org/986/2024-12-06_14-32-46/ . |
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. |
Nice. :) Focus works for me.
The date range picker for the start date filter no longer has a year (I'm sorry I didn't see it yesterday). In the event schedule start date: When I try to change the year (yyyy) by typing it in, the year is evaluated after the 2nd digit, I would have expected, that it lets me type all 4 digits - this is not related to the react-datepicker I think? |
Yes, I thought about this too, and there is even a way to add a drop down with month/year to choose from (
This problem doesn't seem to be related to the react-datepicker, at least I have similar problems with the old datepicker. Maybe it has to do with conflict checking? We should probably cover this in another issue. |
I had another look at it and found another way to achieve the ability to easily change the month and year. I added the functionality in the last commit. |
I had a look into the the date range selection of the start date filter.
I'm not able to focus the dropdowns via tab-cycle, but I don't see it as a big issue since the (shift+) pgup/down-keys are there. |
I added an issue: #1005 |
This PR fixes #948 #920 #614 and, as mentioned in #614 (comment), the react-datepicker brings also some advantages over the MUI DatePicker.
With this PR, there is still the statistics component that uses the MUI DatePicker. I haven't been able to replace it because the stats feature doesn't work properly in the new admin UI, see #282. Once this is working again, the MUI DatePicker can also be replaced there and the dependencies can be cleaned up.