Skip to content

refactor(search-reservations): replace native date inputs with flatpickr#1082

Open
JohnVillalovos wants to merge 1 commit intodevelopfrom
jlvillal/flat1
Open

refactor(search-reservations): replace native date inputs with flatpickr#1082
JohnVillalovos wants to merge 1 commit intodevelopfrom
jlvillal/flat1

Conversation

@JohnVillalovos
Copy link
Collaborator

  • Convert begin/end date fields from native inputs to text to use flatpickr
  • Use document.getElementById for element access instead of jQuery
  • Replace jQuery .change() with .on('change') for event handling
  • Add setFlatpickrDisabled(input, disabled) to properly enable/disable flatpickr and its altInput
  • Close flatpickr calendar when disabled
  • Remove unused hidden formatted date inputs and AltId usage in DatePickerSetupControl
  • Drop resourcePopup.js and Qtip includes
  • Remove obsolete hover highlight code

Copilot AI review requested due to automatic review settings February 25, 2026 23:52
Copy link
Contributor

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 PR refactors the Search Reservations UI to rely on Flatpickr-driven date inputs (instead of native <input type="date"> + hidden formatted fields) and reduces jQuery usage / legacy dependencies on that page.

Changes:

  • Convert begin/end date fields to text inputs that submit directly via {formname ...} and initialize via DatePickerSetupControl (Flatpickr).
  • Update reservation-search.js event wiring and add a helper to properly enable/disable Flatpickr inputs (including altInput).
  • Remove Qtip/resource popup includes and obsolete hover-highlight code.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tpl/Search/search-reservations.tpl Replaces native date inputs + hidden formatted fields with Flatpickr setup; removes Qtip/resourcePopup includes.
Web/scripts/reservation-search.js Refactors date element access and range-change handling; adds Flatpickr-aware enable/disable behavior.

- Convert begin/end date fields from native inputs to text to use flatpickr
- Use document.getElementById for element access instead of jQuery
- Replace jQuery .change() with .on('change') for event handling
- Add setFlatpickrDisabled(input, disabled) to properly enable/disable flatpickr and its altInput
- Close flatpickr calendar when disabled
- Remove unused hidden formatted date inputs and AltId usage in DatePickerSetupControl
- Drop resourcePopup.js and Qtip includes
- Remove obsolete hover highlight code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants