Currently, I am facing a challenge while working on an Angular 2 project using Typescript. The calendar I have created is only displayed after a click event, but I would like it to appear on the page as soon as it loads without requiring any user interaction. As I am still learning Typescript, I am unable to achieve this functionality.
Below is the code snippet:
<ng-datepicker [ngModel]="startDatePicker"></ng-datepicker>
In my TypeScript file, I have the following code:
startDatePicker: Date = moment().subtract(1, 'day').toDate();
If you need additional context, please refer to the following screenshots: