Skip to content

feat(datepicker): polish up date range selector - #18531

Merged
andrewseguin merged 1 commit into
angular:date-rangefrom
crisbeto:date-range-selection
Feb 20, 2020
Merged

feat(datepicker): polish up date range selector#18531
andrewseguin merged 1 commit into
angular:date-rangefrom
crisbeto:date-range-selection

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Makes a bunch of changes to polish up the behavior of the date range picker.

  • Makes the range selection logic a bit smarter about when to pick start/end so that it's more intuitive.
  • Fixes hovering over disabled cells triggering the range selection styles.
  • Fixes a "changed after checked" error when selecting a range using the keyboard.
  • Implements validation that the start isn't after the end, and that the end isn't before the start.
  • Adds the missing ARIA attributes.
  • Fixes being able to select the placeholders of a disabled range input.
  • Adds the ability to disable the entire range input.
  • Fixes the inputs not graying out their values when they're disabled.
  • Makes the range input a bit smarter about which input to focus on click.

With these changes the date range picker should be mostly feature-complete.

Makes a bunch of changes to polish up the behavior of the date range picker.

- Makes the range selection logic a bit smarter about when to pick start/end so that it's more intuitive.
- Fixes hovering over disabled cells triggering the range selection styles.
- Fixes a "changed after checked" error when selecting a range using the keyboard.
- Implements validation that the start isn't after the end, and that the end isn't before the start.
- Adds the missing ARIA attributes.
- Fixes being able to select the placeholders of a disabled range input.
- Adds the ability to disable the entire range input.
- Fixes the inputs not greying out their values when they're disabled.
- Makes the range input a bit smarter about which input to focus on click.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent pr: merge safe labels Feb 17, 2020
@crisbeto
crisbeto requested a review from mmalerba as a code owner February 17, 2020 21:30
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 17, 2020
export class MatStartDate<D> extends _MatDateRangeInputBase<D> implements CanUpdateErrorState {
// TODO(crisbeto): start-range-specific validators should go here.
protected _validator = Validators.compose(super._getValidators());
/** Validator that checks whether the start date isn't after the end date. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wording nit: whether --> that

export class MatEndDate<D> extends _MatDateRangeInputBase<D> implements CanUpdateErrorState {
// TODO(crisbeto): end-range-specific validators should go here.
protected _validator = Validators.compose(super._getValidators());
/** Validator that checks whether the end date isn't before the start date. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wording nit: see above

@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Feb 20, 2020
@andrewseguin
andrewseguin merged commit de778a9 into angular:date-range Feb 20, 2020
@crisbeto

Copy link
Copy Markdown
Member Author

ops, looks like this one got in before I had a chance to address the nits. I'll just push it directly to the date-range branch.

crisbeto added a commit that referenced this pull request Feb 26, 2020
Makes a bunch of changes to polish up the behavior of the date range picker.

- Makes the range selection logic a bit smarter about when to pick start/end so that it's more intuitive.
- Fixes hovering over disabled cells triggering the range selection styles.
- Fixes a "changed after checked" error when selecting a range using the keyboard.
- Implements validation that the start isn't after the end, and that the end isn't before the start.
- Adds the missing ARIA attributes.
- Fixes being able to select the placeholders of a disabled range input.
- Adds the ability to disable the entire range input.
- Fixes the inputs not greying out their values when they're disabled.
- Makes the range input a bit smarter about which input to focus on click.
crisbeto added a commit that referenced this pull request Mar 12, 2020
Makes a bunch of changes to polish up the behavior of the date range picker.

- Makes the range selection logic a bit smarter about when to pick start/end so that it's more intuitive.
- Fixes hovering over disabled cells triggering the range selection styles.
- Fixes a "changed after checked" error when selecting a range using the keyboard.
- Implements validation that the start isn't after the end, and that the end isn't before the start.
- Adds the missing ARIA attributes.
- Fixes being able to select the placeholders of a disabled range input.
- Adds the ability to disable the entire range input.
- Fixes the inputs not greying out their values when they're disabled.
- Makes the range input a bit smarter about which input to focus on click.
crisbeto added a commit that referenced this pull request Mar 17, 2020
Makes a bunch of changes to polish up the behavior of the date range picker.

- Makes the range selection logic a bit smarter about when to pick start/end so that it's more intuitive.
- Fixes hovering over disabled cells triggering the range selection styles.
- Fixes a "changed after checked" error when selecting a range using the keyboard.
- Implements validation that the start isn't after the end, and that the end isn't before the start.
- Adds the missing ARIA attributes.
- Fixes being able to select the placeholders of a disabled range input.
- Adds the ability to disable the entire range input.
- Fixes the inputs not greying out their values when they're disabled.
- Makes the range input a bit smarter about which input to focus on click.
crisbeto added a commit that referenced this pull request Mar 21, 2020
Makes a bunch of changes to polish up the behavior of the date range picker.

- Makes the range selection logic a bit smarter about when to pick start/end so that it's more intuitive.
- Fixes hovering over disabled cells triggering the range selection styles.
- Fixes a "changed after checked" error when selecting a range using the keyboard.
- Implements validation that the start isn't after the end, and that the end isn't before the start.
- Adds the missing ARIA attributes.
- Fixes being able to select the placeholders of a disabled range input.
- Adds the ability to disable the entire range input.
- Fixes the inputs not greying out their values when they're disabled.
- Makes the range input a bit smarter about which input to focus on click.
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Mar 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants