@@ -3298,7 +3298,8 @@ class MatDatepickerInputBase {
3298
3298
event . preventDefault ( ) ;
3299
3299
}
3300
3300
}
3301
- _onInput ( value ) {
3301
+ _onInput ( event ) {
3302
+ const value = event . target . value ;
3302
3303
const lastValueWasValid = this . _lastValueValid ;
3303
3304
let date = this . _dateAdapter . parse ( value , this . _dateFormats . parse . dateInput ) ;
3304
3305
this . _lastValueValid = this . _isValidValue ( date ) ;
@@ -3545,7 +3546,7 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3545
3546
return event . source !== this ;
3546
3547
}
3547
3548
static ɵfac = i0 . ɵɵngDeclareFactory ( { minVersion : "12.0.0" , version : "20.0.0-next.1" , ngImport : i0 , type : MatDatepickerInput , deps : [ ] , target : i0 . ɵɵFactoryTarget . Directive } ) ;
3548
- static ɵdir = i0 . ɵɵngDeclareDirective ( { minVersion : "14.0.0" , version : "20.0.0-next.1" , type : MatDatepickerInput , isStandalone : true , selector : "input[matDatepicker]" , inputs : { matDatepicker : "matDatepicker" , min : "min" , max : "max" , dateFilter : [ "matDatepickerFilter" , "dateFilter" ] } , host : { listeners : { "input" : "_onInput($event.target.value )" , "change" : "_onChange()" , "blur" : "_onBlur()" , "keydown" : "_onKeydown($event)" } , properties : { "attr.aria-haspopup" : "_datepicker ? \"dialog\" : null" , "attr.aria-owns" : "_ariaOwns()" , "attr.min" : "min ? _dateAdapter.toIso8601(min) : null" , "attr.max" : "max ? _dateAdapter.toIso8601(max) : null" , "attr.data-mat-calendar" : "_datepicker ? _datepicker.id : null" , "disabled" : "disabled" } , classAttribute : "mat-datepicker-input" } , providers : [
3549
+ static ɵdir = i0 . ɵɵngDeclareDirective ( { minVersion : "14.0.0" , version : "20.0.0-next.1" , type : MatDatepickerInput , isStandalone : true , selector : "input[matDatepicker]" , inputs : { matDatepicker : "matDatepicker" , min : "min" , max : "max" , dateFilter : [ "matDatepickerFilter" , "dateFilter" ] } , host : { listeners : { "input" : "_onInput($event)" , "change" : "_onChange()" , "blur" : "_onBlur()" , "keydown" : "_onKeydown($event)" } , properties : { "attr.aria-haspopup" : "_datepicker ? \"dialog\" : null" , "attr.aria-owns" : "_ariaOwns()" , "attr.min" : "min ? _dateAdapter.toIso8601(min) : null" , "attr.max" : "max ? _dateAdapter.toIso8601(max) : null" , "attr.data-mat-calendar" : "_datepicker ? _datepicker.id : null" , "disabled" : "disabled" } , classAttribute : "mat-datepicker-input" } , providers : [
3549
3550
MAT_DATEPICKER_VALUE_ACCESSOR ,
3550
3551
MAT_DATEPICKER_VALIDATORS ,
3551
3552
{ provide : MAT_INPUT_VALUE_ACCESSOR , useExisting : MatDatepickerInput } ,
@@ -3570,7 +3571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1",
3570
3571
// `aria-owns` for this, because it's only defined while the calendar is open.
3571
3572
'[attr.data-mat-calendar]' : '_datepicker ? _datepicker.id : null' ,
3572
3573
'[disabled]' : 'disabled' ,
3573
- '(input)' : '_onInput($event.target.value )' ,
3574
+ '(input)' : '_onInput($event)' ,
3574
3575
'(change)' : '_onChange()' ,
3575
3576
'(blur)' : '_onBlur()' ,
3576
3577
'(keydown)' : '_onKeydown($event)' ,
@@ -4273,8 +4274,8 @@ class MatDateRangeInputPartBase extends MatDatepickerInputBase {
4273
4274
this . _errorStateTracker . updateErrorState ( ) ;
4274
4275
}
4275
4276
/** Handles `input` events on the input element. */
4276
- _onInput ( value ) {
4277
- super . _onInput ( value ) ;
4277
+ _onInput ( event ) {
4278
+ super . _onInput ( event ) ;
4278
4279
this . _rangeInput . _handleChildValueChange ( ) ;
4279
4280
}
4280
4281
/** Opens the datepicker associated with the input. */
@@ -4376,7 +4377,7 @@ class MatStartDate extends MatDateRangeInputPartBase {
4376
4377
}
4377
4378
}
4378
4379
static ɵfac = i0 . ɵɵngDeclareFactory ( { minVersion : "12.0.0" , version : "20.0.0-next.1" , ngImport : i0 , type : MatStartDate , deps : null , target : i0 . ɵɵFactoryTarget . Directive } ) ;
4379
- static ɵdir = i0 . ɵɵngDeclareDirective ( { minVersion : "14.0.0" , version : "20.0.0-next.1" , type : MatStartDate , isStandalone : true , selector : "input[matStartDate]" , outputs : { dateChange : "dateChange" , dateInput : "dateInput" } , host : { attributes : { "type" : "text" } , listeners : { "input" : "_onInput($event.target.value )" , "change" : "_onChange()" , "keydown" : "_onKeydown($event)" , "blur" : "_onBlur()" } , properties : { "disabled" : "disabled" , "attr.aria-haspopup" : "_rangeInput.rangePicker ? \"dialog\" : null" , "attr.aria-owns" : "_rangeInput._ariaOwns\n ? _rangeInput._ariaOwns()\n : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null" , "attr.min" : "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null" , "attr.max" : "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null" } , classAttribute : "mat-start-date mat-date-range-input-inner" } , providers : [
4380
+ static ɵdir = i0 . ɵɵngDeclareDirective ( { minVersion : "14.0.0" , version : "20.0.0-next.1" , type : MatStartDate , isStandalone : true , selector : "input[matStartDate]" , outputs : { dateChange : "dateChange" , dateInput : "dateInput" } , host : { attributes : { "type" : "text" } , listeners : { "input" : "_onInput($event)" , "change" : "_onChange()" , "keydown" : "_onKeydown($event)" , "blur" : "_onBlur()" } , properties : { "disabled" : "disabled" , "attr.aria-haspopup" : "_rangeInput.rangePicker ? \"dialog\" : null" , "attr.aria-owns" : "_rangeInput._ariaOwns() || null" , "attr.min" : "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()! ) : null" , "attr.max" : "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()! ) : null" } , classAttribute : "mat-start-date mat-date-range-input-inner" } , providers : [
4380
4381
{ provide : NG_VALUE_ACCESSOR , useExisting : MatStartDate , multi : true } ,
4381
4382
{ provide : NG_VALIDATORS , useExisting : MatStartDate , multi : true } ,
4382
4383
] , usesInheritance : true , ngImport : i0 } ) ;
@@ -4388,15 +4389,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1",
4388
4389
host : {
4389
4390
'class' : 'mat-start-date mat-date-range-input-inner' ,
4390
4391
'[disabled]' : 'disabled' ,
4391
- '(input)' : '_onInput($event.target.value )' ,
4392
+ '(input)' : '_onInput($event)' ,
4392
4393
'(change)' : '_onChange()' ,
4393
4394
'(keydown)' : '_onKeydown($event)' ,
4394
4395
'[attr.aria-haspopup]' : '_rangeInput.rangePicker ? "dialog" : null' ,
4395
- '[attr.aria-owns]' : `_rangeInput._ariaOwns
4396
- ? _rangeInput._ariaOwns()
4397
- : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null` ,
4398
- '[attr.min]' : '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null' ,
4399
- '[attr.max]' : '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null' ,
4396
+ '[attr.aria-owns]' : '_rangeInput._ariaOwns() || null' ,
4397
+ '[attr.min]' : '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()!) : null' ,
4398
+ '[attr.max]' : '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()!) : null' ,
4400
4399
'(blur)' : '_onBlur()' ,
4401
4400
'type' : 'text' ,
4402
4401
} ,
@@ -4471,7 +4470,7 @@ class MatEndDate extends MatDateRangeInputPartBase {
4471
4470
}
4472
4471
}
4473
4472
static ɵfac = i0 . ɵɵngDeclareFactory ( { minVersion : "12.0.0" , version : "20.0.0-next.1" , ngImport : i0 , type : MatEndDate , deps : null , target : i0 . ɵɵFactoryTarget . Directive } ) ;
4474
- static ɵdir = i0 . ɵɵngDeclareDirective ( { minVersion : "14.0.0" , version : "20.0.0-next.1" , type : MatEndDate , isStandalone : true , selector : "input[matEndDate]" , outputs : { dateChange : "dateChange" , dateInput : "dateInput" } , host : { attributes : { "type" : "text" } , listeners : { "input" : "_onInput($event.target.value )" , "change" : "_onChange()" , "keydown" : "_onKeydown($event)" , "blur" : "_onBlur()" } , properties : { "disabled" : "disabled" , "attr.aria-haspopup" : "_rangeInput.rangePicker ? \"dialog\" : null" , "attr.aria-owns" : "_rangeInput._ariaOwns\n ? _rangeInput._ariaOwns()\n : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null" , "attr.min" : "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null" , "attr.max" : "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null" } , classAttribute : "mat-end-date mat-date-range-input-inner" } , providers : [
4473
+ static ɵdir = i0 . ɵɵngDeclareDirective ( { minVersion : "14.0.0" , version : "20.0.0-next.1" , type : MatEndDate , isStandalone : true , selector : "input[matEndDate]" , outputs : { dateChange : "dateChange" , dateInput : "dateInput" } , host : { attributes : { "type" : "text" } , listeners : { "input" : "_onInput($event)" , "change" : "_onChange()" , "keydown" : "_onKeydown($event)" , "blur" : "_onBlur()" } , properties : { "disabled" : "disabled" , "attr.aria-haspopup" : "_rangeInput.rangePicker ? \"dialog\" : null" , "attr.aria-owns" : "_rangeInput._ariaOwns() || null" , "attr.min" : "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()! ) : null" , "attr.max" : "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()! ) : null" } , classAttribute : "mat-end-date mat-date-range-input-inner" } , providers : [
4475
4474
{ provide : NG_VALUE_ACCESSOR , useExisting : MatEndDate , multi : true } ,
4476
4475
{ provide : NG_VALIDATORS , useExisting : MatEndDate , multi : true } ,
4477
4476
] , usesInheritance : true , ngImport : i0 } ) ;
@@ -4483,15 +4482,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1",
4483
4482
host : {
4484
4483
'class' : 'mat-end-date mat-date-range-input-inner' ,
4485
4484
'[disabled]' : 'disabled' ,
4486
- '(input)' : '_onInput($event.target.value )' ,
4485
+ '(input)' : '_onInput($event)' ,
4487
4486
'(change)' : '_onChange()' ,
4488
4487
'(keydown)' : '_onKeydown($event)' ,
4489
4488
'[attr.aria-haspopup]' : '_rangeInput.rangePicker ? "dialog" : null' ,
4490
- '[attr.aria-owns]' : `_rangeInput._ariaOwns
4491
- ? _rangeInput._ariaOwns()
4492
- : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null` ,
4493
- '[attr.min]' : '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null' ,
4494
- '[attr.max]' : '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null' ,
4489
+ '[attr.aria-owns]' : '_rangeInput._ariaOwns() || null' ,
4490
+ '[attr.min]' : '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()!) : null' ,
4491
+ '[attr.max]' : '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()!) : null' ,
4495
4492
'(blur)' : '_onBlur()' ,
4496
4493
'type' : 'text' ,
4497
4494
} ,
0 commit comments