Skip to content
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

IgxDateRangePickerComponent's calendar should display selected range if both start and end are filled and valid #7593

Closed
jackofdiamond5 opened this issue Jun 15, 2020 · 0 comments · Fixed by #7640
Assignees
Labels
📅 date-range-picker 🧰 feature-request version: 9.1.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@jackofdiamond5
Copy link
Member

jackofdiamond5 commented Jun 15, 2020

Is your feature request related to a problem? Please describe.

The IgxDateRangePickerComponent with input projections will update its inputs on each calendar interaction. This means that if you were to select a single date - the start input will be filled in, then selecting another date (finalizing the range selection) will fill in the end input. Additionally, clearing the start input will also clear the end input but clearing the end input will not clear the start input and upon opening the calendar we will still have a selected value even though there is no defined range in the editable inputs. Closing the calendar in this state will update the end input with the value of the start input.

Describe the solution you'd like

To fix these inconsistencies we've come to an agreement that the following behavior is preferable:

  1. Selecting a single range will update the start input, closing the calendar in this state will not update the end input.
  2. Selecting a second value from the calendar will update the second input accordingly.
  3. The calendar will display a selected range only if the two projected inputs are filled in.

Also, the validity of the IgxDateRangePickerComponent will continue to be determined based on the following factors:

  1. The positioning of ngModel:
    • If it is on the component - the two inputs must be filled in and within a specified range (if any is defined) in order for its state to be valid.
    • if the two projected inputs have ngModel they will be validated separately

Describe alternatives you've considered

n/a

Additional context

n/a

@jackofdiamond5 jackofdiamond5 self-assigned this Jun 15, 2020
@jackofdiamond5 jackofdiamond5 added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Jun 15, 2020
@jackofdiamond5 jackofdiamond5 added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Jun 17, 2020
Lipata pushed a commit that referenced this issue Jun 22, 2020
…e filled in #7593 (#7614)

- set validity based on inputs' value(s)
- ensure the selected range is within min/max (if any)
- swap start & end if start is greater
Lipata pushed a commit that referenced this issue Jun 22, 2020
…e filled in #7593 (#7614)

- set validity based on inputs' value(s)
- ensure selected range is within min/max (if any)
- swap start & end if start is greater
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📅 date-range-picker 🧰 feature-request version: 9.1.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant