Skip to content

Commit f3ea0c4

Browse files
committed
feat(time-picker): Adding label #6905
1 parent de97dff commit f3ea0c4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

projects/igniteui-angular/src/lib/time-picker/time-picker.component.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<ng-template #dropdownInputTemplate>
22
<igx-input-group #group (mousedown)="mouseDown($event)">
3-
<label igxLabel>Time</label>
3+
<label igxLabel *ngIf="!labelDirective">Time</label>
4+
<ng-container ngProjectAs="[igxLabel]">
5+
<ng-content select="[igxLabel]"></ng-content>
6+
</ng-container>
47
<igx-prefix (click)="openDialog(group.element.nativeElement)">
58
<igx-icon>access_time</igx-icon>
69
</igx-prefix>

projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts

+7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import { CurrentResourceStrings } from '../core/i18n/resources';
5151
import { KEYS, CancelableBrowserEventArgs, IBaseEventArgs } from '../core/utils';
5252
import { InteractionMode } from '../core/enums';
5353
import { IgxTextSelectionModule} from '../directives/text-selection/text-selection.directive';
54+
import { IgxLabelDirective } from '../directives/label/label.directive';
5455

5556

5657
let NEXT_ID = 0;
@@ -505,6 +506,12 @@ export class IgxTimePickerComponent implements
505506
@ContentChild(IgxTimePickerActionsDirective, { read: IgxTimePickerActionsDirective })
506507
public timePickerActionsDirective: IgxTimePickerActionsDirective;
507508

509+
/**
510+
* @hidden @internal
511+
*/
512+
@ContentChild(IgxLabelDirective)
513+
public labelDirective: IgxLabelDirective;
514+
508515
/**
509516
* @hidden
510517
*/

0 commit comments

Comments
 (0)