Skip to content

Commit

Permalink
fix(date-picker): Depracation warning for the label property. #8917
Browse files Browse the repository at this point in the history
  • Loading branch information
valadzhov committed Feb 8, 2021
1 parent 0c6dde1 commit 99c0a87
Showing 1 changed file with 12 additions and 2 deletions.
Expand Up @@ -161,6 +161,7 @@ const noop = () => { };
})
export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor,
EditorProvider, OnInit, AfterViewInit, OnDestroy, AfterViewChecked {
private _label: string = 'Date';
/**
* Gets/Sets the `IgxDatePickerComponent` label.
* @remarks
Expand All @@ -182,7 +183,17 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
<label igxLabel>Custom label</label>
</igx-date-picker> `)
@Input()
public label = 'Date';
public get label(): string {
return this._label;
}

public set label(v: string) {
this._label = v;
}

public get labelTemplate(): IgxLabelDirective {
return this._labelDirectiveUserTemplate;
}

/**
* Gets/Sets the `IgxDatePickerComponent` label visibility.
Expand Down Expand Up @@ -453,7 +464,6 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
displayData: this.displayData,
format: this.format,
isSpinLoop: this.isSpinLoop,
label: this.label,
labelVisibility: this.labelVisibility,
locale: this.locale,
mask: this.mask,
Expand Down

0 comments on commit 99c0a87

Please sign in to comment.