Skip to content

Conversation

@HannesClausnitzer
Copy link
Collaborator

fixes #2546

Copilot AI review requested due to automatic review settings January 12, 2026 20:03
Copy link

Copilot AI left a 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.

Copy link
Collaborator

@hansegucker hansegucker left a 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!

@niklasmohrin
Copy link
Member

There are also still adjustments in _adjustments.scss for the bootstrap datetimepicker

Copy link
Member

@niklasmohrin niklasmohrin left a 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

Copy link
Member

@janno42 janno42 left a 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.

@HannesClausnitzer
Copy link
Collaborator Author

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).
I have found a different alternative to the bootstrap-datetimepicker that is quite similar but doesn't use jQuery:
https://github.com/Eonasdan/tempus-dominus/
You can try it out here:
https://getdatepicker.com/6/repl.html
What do you think about this? Would it be worth it implementing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Replace Datetime Picker

5 participants