Skip to content

Align Date & Date Range Picker props related to calendar with WC #16141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ddaribo
Copy link
Contributor

@ddaribo ddaribo commented Aug 14, 2025

Closes #16131
Introduces the missing properties listed in the issue description table.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them - // TODO - update spec

Additional behaviors that are addressed as a result of introducing the new props:

  1. Dynamic value update on typing - Date Picker

    • Issue: In WC, typing updates the selected calendar date; in Angular, it did not.

      • WC:

        1-wc-dp-selected-value-update-on-type
      • Angular:

        text
    • Commit: feat(dp): update calendar selection on typing + test

  2. Disabled date handling on value change

    • Issue: Angular blocks selecting disabled dates via API/model binding; WC allows it. When changing from a valid date to a disabled one via input the following is observed.

      • WC omits the previous selection, correctly reflecting the change. Since the disabled dates are part of the calendar/date range picker value, at this point the component would become invalid:

        text
      • Angular shows last valid date as selected: Note: Behavior visible only after fix from (1), as otherwise the component would not reflect the newly typed value. Also can only be tested with the logic from this PR, which allows the picker to remain open while typing:

        text
    • Commit: refactor(calendar): don't block selection for disabled date through model/API

  3. Active date with min/max restrictions

    • Issue: The Angular DP & DRP do not expose property to set activeDate as in WC -> the PR adds this. However, for the Date Picker, there is the following difference:
      • WC: Active date is value or current date, even if outside min/max, if set.

        text
      • Angular: Additional logic forces active (view) date to min/max if value is out of range, but ignores disabledDates - so is rather incomplete - ref here. The PR currently omits this logic, as such handling was not discussed for the Web Components DP & DRP.

        text
        • Commit: refactor(dp): align the calendar activeDate with WC
  4. Typing cross-month/year should update the days view

    • Issue: Typing a date from another month/year didn’t switch the calendar view in Angular DP & DRP (discussed for IgcDateRangePicker; also not currently working for WC Date Picker - issue logged).
      • WC

        text
      • Angular - this cannot be observed before the enhancements of (1) and the close behavior PR, as the calendar is always closed on typing prior to the WC alignment.

  • Commit: feat(dp): update calendar days view on typing & value is another view-month/year
  1. DRP: single typed value gets reflected as start of the selection
    • Issue: WC DRP reflects a typed single date as the start (single-day) range in the calendar; Angular DRP did not.

      • WC

        text
      • Angular

        text
    • Commit: feat(drp): typing a single value results in calendar range of single date

@ddaribo ddaribo force-pushed the bpachilova/dp-drp-calendar-props-16131 branch from 3f80508 to 421e62a Compare August 14, 2025 10:22
@ddaribo ddaribo added 📈 enhancement ❌ status: awaiting-test PRs awaiting manual verification 📅 date-picker 📅 date-range-picker version: 20.1.x 🛠️ status: in-development Issues and PRs with active development on them and removed ❌ status: awaiting-test PRs awaiting manual verification labels Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Date Range Picker, Date Picker] Discrepancies in the calendar-related customization options- align with WC
1 participant