Skip to content

Commit 26eabfa

Browse files
authored
Merge branch 'master' into mvenkov/close-overlays-on-escape-correctly
2 parents 350e2da + b9aa66a commit 26eabfa

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ All notable changes for each version of this project will be documented in this
2121
- Removed `onDataPreLoad` event as it is specific for remote virtualization implementation, which is not supported for the `igxTreeGrid`. A more generic `onScroll` event is exposed and can be used instead.
2222
- `IgxTimePicker`
2323
- Added a disabled style for time parts outside of the minimum and maximum range.
24+
- `igxDatePicker`
25+
- Added new property - `editorTabIndex`, that allows setting tabindex for the default editor.
2426

2527
### New Features
2628
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[value]="displayData || ''"
1111
[disabled]="disabled"
1212
(blur)="onBlur($event)"
13+
[tabindex]='editorTabIndex'
1314
readonly
1415
/>
1516
</igx-input-group>
@@ -36,6 +37,7 @@
3637
(wheel)="onWheel($event)"
3738
(input)="onInput($event)"
3839
(focus)="onFocus()"
40+
[tabindex]='editorTabIndex'
3941
/>
4042
<igx-suffix *ngIf="!isEmpty" (click)="clear()">
4143
<igx-icon>clear</igx-icon>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,13 @@ describe('IgxDatePicker', () => {
277277
expect(input).toEqual(document.activeElement);
278278
}));
279279

280+
it('should allow setting editorTabIndex', () => {
281+
fixture.componentInstance.datePicker.editorTabIndex = 3;
282+
fixture.detectChanges();
283+
const input = fixture.debugElement.query(By.directive(IgxInputDirective)).nativeElement;
284+
expect(input.tabIndex).toBe(3);
285+
});
286+
280287
});
281288

282289
describe('DatePicker with passed date', () => {

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
177177
*/
178178
@Input() public locale: 'en';
179179

180+
/**
181+
* Gets/Sets the default template editor's tabindex.
182+
* @example
183+
* ```html
184+
* <igx-date-picker editorTabIndex="1"></igx-date-picker>
185+
* ```
186+
*/
187+
@Input() public editorTabIndex: number;
188+
180189
/**
181190
* Gets/Sets on which day the week starts.
182191
* @example

0 commit comments

Comments
 (0)