Skip to content

Commit 69ca451

Browse files
committed
fix(time-picker): isSelectedTIme condition for fr seconds
1 parent 5ff2405 commit 69ca451

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: projects/igniteui-angular/src/lib/time-picker/time-picker.directives.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export class IgxTimeItemDirective {
280280
const fractionalSecondsPart = inputDateParts.find(element => element.type === 'fractionalSeconds');
281281
const partValue = DateTimeUtil.getPartValue(this.timePicker.selectedDate, fractionalSecondsPart, fractionalSecondsPart.format.length);
282282
const leadingZerosRegex = /^0+/;
283-
return partValue.replace(leadingZerosRegex, '') === currentValue.replace(leadingZerosRegex, '');
283+
return this.value !== '' && partValue.replace(leadingZerosRegex, '') === currentValue.replace(leadingZerosRegex, '');
284284
case 'ampmList':
285285
const ampmPart = inputDateParts.find(element => element.format.indexOf('a') !== -1 || element.format === 'tt');
286286
return DateTimeUtil.getPartValue(this.timePicker.selectedDate, ampmPart, ampmPart.format.length) === this.value;

0 commit comments

Comments
 (0)