Skip to content

Commit 1e40a76

Browse files
committed
Merge branch 'PMiteva/time-picker-refactoring' of https://github.com/IgniteUI/igniteui-angular into PMiteva/time-picker-refactoring
# Conflicts: # projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts
2 parents 0a0e710 + 384818f commit 1e40a76

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ export class IgxTimePickerComponent extends PickerBaseDirective
132132
@Input()
133133
public displayFormat: string
134134

135+
if (value && this.validateFormat(value)) {
136+
this._displayFormat = value;
137+
}
138+
}
139+
140+
public get displayFormat(): string {
141+
return this._displayFormat;
142+
}
143+
135144
/**
136145
* The expected user input format and placeholder.
137146
*
@@ -144,7 +153,17 @@ export class IgxTimePickerComponent extends PickerBaseDirective
144153
* ```
145154
*/
146155
@Input()
147-
public inputFormat: string = DateTimeUtil.DEFAULT_TIME_INPUT_FORMAT;
156+
public set inputFormat(value: string) {
157+
this._inputFormat = DateTimeUtil.DEFAULT_TIME_INPUT_FORMAT;
158+
159+
if (value && this.validateFormat(value)) {
160+
this._inputFormat = value;
161+
}
162+
}
163+
164+
public get inputFormat(): string {
165+
return this._inputFormat;
166+
}
148167

149168
/**
150169
* Gets/Sets the interaction mode - dialog or drop down.

0 commit comments

Comments
 (0)