Skip to content

Commit 2baf7ca

Browse files
authored
Merge pull request carbon-design-system#2860 from Akshat55/issue.2857
fix: set initial date to input
2 parents 0f72031 + 25847fb commit 2baf7ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/datepicker/datepicker.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ export class DatePicker implements
323323
}
324324

325325
ngAfterViewInit() {
326+
this.input.input.nativeElement.value = this._value[0] ?? "";
327+
if (this.range) {
328+
this.rangeInput.input.nativeElement.value = this._value[1] ?? "";
329+
}
326330
setTimeout(() => {
327331
this.addInputListeners();
328332
}, 0);

0 commit comments

Comments
 (0)