Repository navigation
fix(datetime): improve range selection behavior and styling - #31759
Merged
Merged
Conversation
Once a full date range is selected (start + end), the next tap now always starts a new range instead of modifying the existing one. This aligns with Material and OutSystems UI Date Picker behavior. Resolves ROU-13222
- Add horizontal grid padding and --range-track-edge-overflow to the ionic theme so the range track bridges across week boundaries, matching the ios and md themes. - Lift range-start and range-end wrappers to z-index: 1 so their circles are not covered by the next row's range track when they overflow their grid cell.
When a date range is set programmatically with start/end dates outside the min/max constraints, clamp the range to the valid bounds. If the entire range falls outside min/max, clear the selection entirely. Resolves ROU-13214
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
When the second tap in a range selection is earlier than the first, swap start and end so the range renders correctly.
Consolidate duplicate "entirely before/after" e2e tests into one, update test page with start-before-min, end-after-max, and entirely-outside cases, and add ionChange console logger.
thetaPC
requested changes
Nov 18, 2026
thetaPC
left a comment
Contributor
There was a problem hiding this comment.
Notes on the description:
- The description doesn't say why the tap behavior is changing. Could you add the reason, such as design feedback asking that a third tap start a new range, matching Material's range picker? If the swap is dropped (refer to the inline comment), the "Range order not normalized" bullets can go too, since
nextalready treats an earlier second tap as a new start. - The out-of-bounds console warning already existed (
warnIfValueOutOfBounds), so it isn't new behavior.
… range The previous same-day check after clamping missed ranges that touch min or max boundaries. Compare the original start/end against bounds first so a range ending exactly on min is kept and a single-date range outside bounds is correctly cleared.
…el seams Each day in a range previously drew its own piece of the track with a ::before using two background layers. At fractional device pixel ratios (e.g. 2.625× on Pixel 9), the browser anti-aliased each layer's edge independently, letting the white background layer show through at every column boundary. The first range day of each run within a week now draws the track for the whole run via --range-track-span, so there are no edges between days. The track uses a single background color instead of two layers, which means both opaque and translucent --range-background values work without overlap artifacts. The grid uses isolation: isolate as a single stacking context, replacing the per-wrapper z-index rules. The ionic grid padding and edge overflow are removed so the grid matches the design.
Add back focus-within (z-index: 2) and range-start/range-end (z-index: 1) rules, excluding range-track wrappers whose wide ::before would cover adjacent day numbers if elevated. Also change range selection so tapping an earlier date as the second click starts a new range instead of swapping, matching Material's range picker. The focus screenshot now targets day 17 (adjacent to range-end) to catch focus ring clipping.
# Conflicts: # core/src/components/datetime/test/show-adjacent-days/datetime.e2e.ts-snapshots/datetime-show-adjacent-days-display-ionic-md-ltr-light-Mobile-Firefox-linux.png # core/src/components/datetime/test/show-adjacent-days/datetime.e2e.ts-snapshots/datetime-show-adjacent-days-weekends-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png
thetaPC
requested changes
Nov 19, 2026
thetaPC
left a comment
Contributor
There was a problem hiding this comment.
Once the z-index rule is dropped, the "Z-index fix" bullet in the description needs the same update: the grid's isolation: isolate keeps the circles clear, and only the focused day is lifted.
Remove the separate z-index: 1 rule for range-start/range-end wrappers since calendar-day-wrapper-range-end is no longer rendered and every range-start with a track is also a range-track wrapper. Demote the focus-within rule back to z-index: 1 since there is no competing layer to stay above.
This branch was successfully deployed
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.
Issue number: resolves internal
What is the current behavior?
::before, and the per-cell boundaries left visible seams.min/maxrenders those out-of-bounds dates as highlighted.What is the new behavior?
--range-track-span, eliminating seams between days. The grid usesisolation: isolateas a single stacking context, replacing the per-wrapperz-index: 0.isolation: isolatekeeps every track behind every day button, so the circles stay clear without per-wrapper elevation. Only the focused day is lifted (z-index: 1) so its focus ring isn't covered by the following day's button. Wrappers that draw the track (calendar-day-wrapper-range-track) are excluded to avoid elevating the wide::beforeover adjacent day numbers.min/maxbounds. If the entire range falls outside bounds, the selection is cleared.Does this introduce a breaking change?
Other information
Manual test page
Range test page
New min/max scenarios added: