-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(datepicker): polish up date range selector #18531
feat(datepicker): polish up date range selector #18531
Conversation
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.
}, | ||
providers: [ | ||
{provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true}, | ||
{provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true} | ||
] | ||
}) | ||
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. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wording nit: whether --> that
}, | ||
providers: [ | ||
{provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true}, | ||
{provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true} | ||
] | ||
}) | ||
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. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wording nit: see above
ops, looks like this one got in before I had a chance to address the nits. I'll just push it directly to the |
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.
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.
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.
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.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Makes a bunch of changes to polish up the behavior of the date range picker.
With these changes the date range picker should be mostly feature-complete.