Skip to content

Commit

Permalink
chore(*): bug fixing/improvements #4679
Browse files Browse the repository at this point in the history
  • Loading branch information
SAndreeva committed Jun 7, 2019
1 parent 4eea3f9 commit 8ae6c82
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,6 @@ export class IgxTimePickerComponent implements
*/
public _ampmItems = [];

/**
* @hidden
*/
public mask: string;
/**
* @hidden
*/
Expand Down Expand Up @@ -545,6 +541,7 @@ export class IgxTimePickerComponent implements
private _okButtonLabel = null;
private _cancelButtonLabel = null;
private _format: string;
private _mask: string;
private _displayValue: string;

private _isHourListLoop = this.isSpinLoop;
Expand All @@ -565,6 +562,17 @@ export class IgxTimePickerComponent implements
private _onTouchedCallback: () => void = () => { };
private _onChangeCallback: (_: Date) => void = () => { };

/**
* @hidden
*/
get mask(): string {
return this._mask || '00:00 LL';
}

set mask(val: string) {
this._mask = val;
}

/**
* @hidden
*/
Expand Down Expand Up @@ -1173,7 +1181,7 @@ export class IgxTimePickerComponent implements
}

if (this.selectedHour === undefined) {
this.selectedHour = !this.showHoursList && this.value ? this.value.getHours().toString() : `${this._hourItems[3]}`;
this.selectedHour = !this.showHoursList && this.value ? this.value.getHours().toString() : this.showHoursList ? `${this._hourItems[3]}` : '0';
}
if (this.selectedMinute === undefined) {
this.selectedMinute = !this.showMinutesList && this.value ? this.value.getMinutes().toString() : '0';
Expand Down

0 comments on commit 8ae6c82

Please sign in to comment.