Skip to content

Commit c858c28

Browse files
authored
Merge pull request #7967 from IgniteUI/valadzhov/textselection-directive-in-timepicker-6827
fix(time-picker): Adding igxTimeSelection to template, #6827
2 parents e7edbae + 1a4a32a commit c858c28

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
[focusedValuePipe]="inputFormat"
1515
[promptChar]="promptChar"
1616
[value]="displayValue"
17+
[igxTextSelection]="true"
1718
(input)="onInput($event)"
1819
(blur)="onBlur($event)"
1920
(focus)="onFocus($event)"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,7 @@ describe('IgxTimePicker', () => {
20712071
it('Should set time picker status to invalid when it is required and has no value onBlur', fakeAsync(() => {
20722072
timePickerOnBlurComponent.mode = InteractionMode.DropDown;
20732073
timePickerOnBlurComponent.mask = 'dd/mm/yyyy';
2074+
20742075
fixture.detectChanges();
20752076

20762077
const inputDirectiveElements = fixture.debugElement.queryAll(By.directive(IgxInputDirective));
@@ -2080,6 +2081,7 @@ describe('IgxTimePicker', () => {
20802081
expect(inputDirective.valid).toEqual(IgxInputState.INITIAL);
20812082

20822083
inputDirectiveElement.triggerEventHandler('focus', { target: { value: null }});
2084+
tick(16);
20832085
fixture.detectChanges();
20842086

20852087
expect(inputDirective.valid).toEqual(IgxInputState.INITIAL);

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ import { ITimePickerResourceStrings } from '../core/i18n/time-picker-resources';
5050
import { CurrentResourceStrings } from '../core/i18n/resources';
5151
import { KEYS, CancelableBrowserEventArgs, IBaseEventArgs } from '../core/utils';
5252
import { InteractionMode } from '../core/enums';
53+
import { IgxTextSelectionModule} from '../directives/text-selection/text-selection.directive';
54+
5355

5456
let NEXT_ID = 0;
5557
const ITEMS_COUNT = 7;
@@ -2173,7 +2175,8 @@ export class IgxTimePickerComponent implements
21732175
IgxIconModule,
21742176
IgxButtonModule,
21752177
IgxMaskModule,
2176-
IgxToggleModule
2178+
IgxToggleModule,
2179+
IgxTextSelectionModule
21772180
],
21782181
providers: []
21792182
})

0 commit comments

Comments
 (0)