Skip to content

Commit a2bb56c

Browse files
committed
feat(date-picker): Add selection directive #5658
1 parent f7d79c7 commit a2bb56c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
<igx-icon>today</igx-icon>
1616
</igx-prefix>
1717
<label *ngIf="labelVisibility" igxLabel>{{label}}</label>
18-
<input #editableInput class="igx-date-picker__input-date" igxInput type="text" [value]="transformedDate"
18+
<input #editableInput class="igx-date-picker__input-date" igxInput [igxTextSelection]="true"
19+
type="text" [value]="transformedDate"
1920
[igxMask]="inputMask" [placeholder]="mask" [disabled]="disabled" [displayValuePipe]="displayValuePipe"
2021
[focusedValuePipe]="inputValuePipe" (blur)="onBlur($event)" (wheel)="onWheel($event)"
2122
(input)="onInput($event)" (focus)="onFocus()" />
@@ -25,4 +26,4 @@
2526
</igx-input-group>
2627
</ng-template>
2728

28-
<ng-container *ngTemplateOutlet="template; context: context"></ng-container>
29+
<ng-container *ngTemplateOutlet="template; context: context"></ng-container>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { IgxInputGroupModule, IgxInputDirective, IgxInputGroupComponent } from '
3232
import { Subject, fromEvent, animationFrameScheduler, interval } from 'rxjs';
3333
import { filter, takeUntil, throttle } from 'rxjs/operators';
3434
import { IgxOverlayOutletDirective } from '../directives/toggle/toggle.directive';
35+
import { IgxTextSelectionModule} from '../directives/text-selection/text-selection.directive';
3536
import {
3637
OverlaySettings,
3738
IgxOverlayService,
@@ -1351,7 +1352,8 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
13511352
IgxDatePickerTemplateDirective, DatePickerDisplayValuePipe, DatePickerInputValuePipe],
13521353
exports: [IgxDatePickerComponent, IgxDatePickerTemplateDirective, IgxDatePickerActionsDirective,
13531354
DatePickerDisplayValuePipe, DatePickerInputValuePipe],
1354-
imports: [CommonModule, IgxIconModule, IgxInputGroupModule, IgxCalendarModule, IgxButtonModule, IgxRippleModule, IgxMaskModule],
1355+
imports: [CommonModule, IgxIconModule, IgxInputGroupModule, IgxCalendarModule, IgxButtonModule,
1356+
IgxRippleModule, IgxMaskModule, IgxTextSelectionModule],
13551357
entryComponents: [IgxCalendarContainerComponent]
13561358
})
13571359
export class IgxDatePickerModule { }

0 commit comments

Comments
 (0)