Skip to content

Commit

Permalink
[DURACOM-194] fixed year input value on input type date
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaismailati committed Oct 30, 2023
1 parent 543b4ad commit c412c1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ export class DsDatePickerComponent extends DynamicFormControlComponent implement
}
}

this.maxYear = this.initialYear + 100;

}
this.maxYear = now.getUTCFullYear() + 100;
}

onBlur(event) {
this.blur.emit();
Expand Down
3 changes: 1 addition & 2 deletions src/app/shared/form/number-picker/number-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ export class NumberPickerComponent implements OnInit, ControlValueAccessor {

if (i >= this.min && i <= this.max) {
this.value = i;
this.emitChange();
} else if (event.target.value === null || event.target.value === '') {
this.value = null;
this.emitChange();
} else {
this.value = undefined;
}
this.emitChange();
} catch (e) {
this.value = undefined;
}
Expand Down

0 comments on commit c412c1f

Please sign in to comment.