Add Shift shortcut for selecting and deselecting multiple dates in between start and end dates - #4
Merged
peterchrjoergensen merged 7 commits intoJul 8, 2026
Conversation
Enable range selection in multi-date mode by handling `@date-click` events in `FormField.vue`. The field now tracks Shift key state, remembers an anchor date, builds an inclusive date range between anchor and clicked date, and merges it into the current selection with deduplication and stable ordering. Also reset the anchor when selections are cleared/emptied, and document the new Shift-click behavior in the README. Rebuilt compiled assets and manifest.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Shift-click range selection for multiple-date mode in the Nova datepicker field by tracking Shift globally and expanding/removing contiguous date ranges between an anchor date and the clicked date.
Changes:
- Wire
@date-clickto custom range-selection handler for multi-date mode (add/remove ranges). - Add Shift key global tracking + range selection helpers (normalize, range build, merge/remove, selected check).
- Document Shift range selection behavior in README; update compiled asset manifest hash.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| resources/js/components/FormField.vue | Add Shift-click range selection logic, global Shift tracking, and selection utilities for multi-date mode. |
| README.md | Document Shift-click range selection behavior in multiple mode. |
| dist/mix-manifest.json | Update asset hash for rebuilt JS bundle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
peterchrjoergensen
marked this pull request as ready for review
July 8, 2026 07:56
mathiaskastrup
approved these changes
Jul 8, 2026
peterchrjoergensen
deleted the
shift-shortcut-for-selecting-multiple-dates-in-between
branch
July 8, 2026 08:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for shift-click range selection in multiple-date mode for the date picker, along with the necessary logic and event handling to ensure a smooth user experience. The main changes include tracking the Shift key globally, managing range selection state, and updating selection logic to support adding or removing contiguous date ranges.
Multiple date selection improvements:
Code enhancements:
formatIsoDateused in new selection logic.Documentation:
README.mdto describe the new shift-click range selection feature in multiple mode.