So I need to get the number of days between the current date and the date we choose from a date picker.. How can i get the number of days onchoosing from date picker .
COMPONENT.HTML file
`<mat-form-field appearance="fill" class="example-form-field">
<mat-label>Choose a date</mat-label>
<input matInput [matDatepicker]="datepicker">
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matIconSuffix [for]="datepicker"></mat-datepicker-toggle>
<mat-datepicker #datepicker>
<mat-datepicker-actions>
<button mat-button matDatepickerCancel>Cancel</button>
<button mat-raised-button color="primary" matDatepickerApply>Apply</button>
</mat-datepicker-actions>
</mat-datepicker>
</mat-form-field>`
For example using date picker if i choose date as 12/01/2023(which is 5 days from now).. I should get the result as 5 Days