Skip to content

Conversation

@sreyaswimlane
Copy link
Contributor

@sreyaswimlane sreyaswimlane commented Sep 15, 2025

Summary

This pull request addresses issues with the ngx-date-range-picker component, specifically improving how preset date range values are handled when the cancel action is used, and fixing date highlighting for provided selectedRange values. The main changes ensure that relative date presets (like "last 7 days") are preserved and not converted to static timestamps when canceling, and that the UI correctly highlights the selected range.

Date Range Preset Handling Improvements:

  • The lastConfirmedRange object in date-range-picker.component.ts now stores both the resolved dates and their original raw expressions, allowing the component to restore relative presets after canceling instead of converting them to timestamps. [1] [2] [3] [4]

Bug Fixes in UI Behavior:

  • Fixed highlighting of dates in the calendar for given selectedRange values, improving the user experience when interacting with preset ranges.

Changelog Updates:

  • Updated CHANGELOG.md to document the above fixes for better tracking and communication with users.
    Setting rangeModel values based on the processed selectedRange value
Screenshot 2025-09-15 at 12 07 57 PM

Checklist

  • *Added unit tests
  • *Added a code reviewer
  • Added changes to /projects/swimlane/ngx-ui/CHANGELOG.md under HEAD (Unreleased)
  • Updated the demo page
  • Included screenshots of visual changes

*required

@netlify
Copy link

netlify bot commented Sep 15, 2025

Deploy Preview for ngx-ui ready!

Name Link
🔨 Latest commit 4d6636d
🔍 Latest deploy log https://app.netlify.com/projects/ngx-ui/deploys/68e3c4de2f488a00083f8fe4
😎 Deploy Preview https://deploy-preview-1141--ngx-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

cursor[bot]

This comment was marked as outdated.

@alok-sahu31 alok-sahu31 merged commit e662797 into master Oct 7, 2025
9 of 10 checks passed
@alok-sahu31 alok-sahu31 deleted the date-range-component-selectedrange-date-highlight-fix branch October 7, 2025 05:09
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.

4 participants