Skip to content

Conversation

@labmecanicatec
Copy link
Contributor

Switched the datepicker implementation from jQuery UI to flatpickr for improved UI and maintainability. Added flatpickr assets, updated styles in librebooking.css, removed jQuery UI datepicker-specific styles from schedule.css, and updated relevant templates and JavaScript to use flatpickr.

@JohnVillalovos JohnVillalovos requested a review from Copilot July 22, 2025 22:57
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 jQuery UI datepicker implementation with flatpickr to provide a more modern and maintainable date picker solution. The change includes updating the necessary templates, JavaScript logic, and styling to work with the new flatpickr library.

Key changes:

  • Integration of flatpickr library assets (JavaScript and CSS) conditionally loaded based on DatePicker template variable
  • Complete rewrite of DatePickerSetup.tpl to use flatpickr configuration instead of jQuery UI
  • Updated schedule.js to handle flatpickr's different callback signature and date object handling

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tpl/javascript-includes.tpl Adds conditional flatpickr JavaScript includes for both local and CDN scenarios
tpl/globalheader.tpl Adds conditional flatpickr CSS includes for both local and CDN scenarios
tpl/Schedule/schedule.tpl Enables DatePicker flag and updates UI elements for better date selection
tpl/Controls/DatePickerSetup.tpl Complete rewrite from jQuery UI datepicker to flatpickr configuration
Web/scripts/schedule.js Updates date handling functions to work with flatpickr's callback signature
Web/css/schedule.css Removes jQuery UI datepicker-specific styling
Web/css/librebooking.css Adds flatpickr-specific styling to match application theme

Switched the datepicker implementation from jQuery UI to flatpickr for
improved UI and maintainability. Added flatpickr assets, updated styles
in librebooking.css, removed jQuery UI datepicker-specific styles from
schedule.css, and updated relevant templates and JavaScript to use
flatpickr.
@JohnVillalovos JohnVillalovos merged commit 5ededdf into LibreBooking:develop Jul 24, 2025
11 checks passed
@labmecanicatec labmecanicatec deleted the flatpickr branch July 30, 2025 14:06
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.

2 participants