File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
projects/igniteui-angular/src/lib/date-range-picker Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1919 < igx-icon family ="default " name ="date_range " [attr.aria-hidden] ="true "> </ igx-icon >
2020</ ng-template >
2121
22+ < ng-template #clearIcon >
23+ < igx-icon family ="default " name ="input_clear " [attr.aria-hidden] ="true "> </ igx-icon >
24+ </ ng-template >
25+
2226< ng-template #defDateSeparatorTemplate > {{ dateSeparator }}</ ng-template >
2327
2428< ng-template #defTemplate >
3640
3741 @if (!clearComponents.length && value) {
3842 < igx-suffix (click) ="clear() ">
39- < igx-icon family =" default " name =" input_clear " > </ igx-icon >
43+ < ng-container *ngTemplateOutlet =" clearIcon " > </ ng-container >
4044 </ igx-suffix >
4145 }
4246
Original file line number Diff line number Diff line change @@ -584,10 +584,17 @@ export class IgxDateRangePickerComponent extends PickerBaseDirective
584584 * ```
585585 */
586586 public clear ( ) : void {
587- // TODO clear the projected inputs
588- if ( ! this . disabled ) {
589- this . value = null ;
590- this . _calendar ?. deselectDate ( ) ;
587+ if ( this . disabled ) {
588+ return ;
589+ }
590+
591+ this . value = null ;
592+ this . _calendar ?. deselectDate ( ) ;
593+ if ( this . hasProjectedInputs ) {
594+ this . projectedInputs . forEach ( ( i ) => {
595+ i . inputDirective . clear ( ) ;
596+ } ) ;
597+ } else {
591598 this . inputDirective . clear ( ) ;
592599 }
593600 }
You can’t perform that action at this time.
0 commit comments