Skip to content

Commit 3c7c6dd

Browse files
authored
Merge pull request #8722 from IgniteUI/amarinov/datePickerStrictTemplate102
fix(inputs): use full union types on igxDatePicker's InteractionMode - 10.2.x
2 parents 90454f8 + e4e5eb5 commit 3c7c6dd

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { mkenum } from './utils';
12
/**
23
* This enumeration is used to configure whether the date/time picker has an editable input with drop down
34
* or is readonly - the date/time is selected only through a dialog.
45
*/
5-
export enum InteractionMode {
6-
DropDown = 'dropdown',
7-
Dialog = 'dialog'
8-
}
6+
export const InteractionMode = mkenum({
7+
DropDown: 'dropdown',
8+
Dialog: 'dialog'
9+
});
10+
export type InteractionMode = (typeof InteractionMode)[keyof typeof InteractionMode];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
562562
* ```
563563
*/
564564
@Input()
565-
public mode = InteractionMode.Dialog;
565+
public mode: InteractionMode = InteractionMode.Dialog;
566566

567567
/**
568568
* Gets/Sets whether date should spin continuously or stop when min/max is reached.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export class IgxTimePickerComponent implements
365365
* @memberof IgxTimePickerComponent
366366
*/
367367
@Input()
368-
public mode = InteractionMode.Dialog;
368+
public mode: InteractionMode = InteractionMode.Dialog;
369369

370370
/**
371371
* Determines the container the popup element should be attached to.

0 commit comments

Comments
 (0)