-
Notifications
You must be signed in to change notification settings - Fork 165
Replace bootstrap-datetimepicker #2608
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
base: main
Are you sure you want to change the base?
Replace bootstrap-datetimepicker #2608
Conversation
a34421a to
8eb3d24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request replaces the bootstrap-datetimepicker JavaScript library with native HTML5 date and datetime-local input types. The change modernizes the date/time input handling by using browser-native controls instead of a third-party library, simplifying the codebase and reducing dependencies.
Changes:
- Replaced bootstrap-datetimepicker widgets with HTML5 native date/datetime inputs across all forms
- Removed bootstrap_datetimepicker.html template includes from multiple templates
- Extracted message rendering into a reusable messages.html template
- Updated plain_page templates to include message rendering explicitly
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| evap/staff/templates/staff_semester_import.html | Removed bootstrap_datetimepicker include and additional JavaScript block |
| evap/staff/templates/staff_evaluation_form.html | Added messages template include for plain_page display |
| evap/staff/templates/staff_course_copyform.html | Removed bootstrap_datetimepicker include |
| evap/staff/forms.py | Updated ImportForm, CourseCopyForm, and EvaluationForm with HTML5 date/datetime widgets |
| evap/rewards/templates/rewards_reward_point_redemption_event_form.html | Removed bootstrap_datetimepicker include |
| evap/rewards/forms.py | Updated RewardPointRedemptionEventForm with HTML5 date widgets |
| evap/evaluation/templates/messages.html | Created reusable messages display template |
| evap/evaluation/templates/evap_evaluation_edit_js.html | Removed bootstrap_datetimepicker include |
| evap/evaluation/templates/base.html | Removed bootstrap_datetimepicker CSS and extracted messages to separate template |
| evap/contributor/forms.py | Updated EvaluationForm widgets (contains bug - incorrect widget type) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hansegucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the file evap/static/js/bootstrap-datetimepicker.min.js still exists.
But apart from that, this looks very good!
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
There are also still adjustments in |
niklasmohrin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool!
We still mention bootstrap-datetimepicker in license.md and the places that are listed in the other comments
janno42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to open the picker once the field receives focus.
Also, please investigate if we can force the date and time format to be our default format YYYY-MM-DD HH:mm.
|
So it seems the native datetime-picker in firefox and chromium doesn't meet our needs, as it doesn't support setting the locale and gives a few focus issues (when the date picker is shown, nothing can be typed into the input field). |
fixes #2546