Utilizing both Bootstrap dropdown and mat date picker in a drop-down menu presents an issue wherein selecting a date from the mat date picker results in the closure of the dropdown. Preserving the dropdown's visibility post-selecting the date is desired. The application framework being used is Angular 17.
<li class="nav-item drop-wrapper">
<div class="dropdown-menu gear-drop settings-menu" >
<p class="text-center py-2 border-bottom setpsize">
Settings Menu
</p>
<a class="dropdown-item">
<div>
<div>
<form class="toggle-form" style="margin-left: 0px;">
My Calendar
<label class="switch" style="margin-left: 10px;">
<input
id="myCalCheckBox"
type="checkbox"
[checked]="myCalEnabled"
(change)="myCalEnableDisable()"
/>
<span class="slider round" style="padding-left: 2px;"></span>
</label>
</form>
</div>
<div>
<mat-field>
<input matInput [matDatepicker]="picker1" placeholder="Start Date" [min]="scratchPadView?.minDateMyCal" [max]="scratchPadView?.maxDateMyCal" (dateChange)="myCalSelectedDate()" [(ngModel)]="myCalStartdate">
<mat-datepicker-toggle matSuffix [for]="picker1" (click)="open()"></mat-datepicker-toggle>
<mat-datepicker #picker1 [startAt]="myCalDefaultDate" touchUi="true"></mat-datepicker>
<input matInput [matDatepicker]="picker2" placeholder="End Date" [min]="scratchPadView?.minDateMyCal" [max]="scratchPadView?.maxDateMyCal" (dateChange)="myCalSelectedDate()" [(ngModel)]="myCalEndDate">
<mat-datepicker-toggle matSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker #picker2 [startAt]="myCalDefaultDate"></mat-datepicker>
</mat-field>
</div>
</div>
</a>
</div>
</li>
The objective is to maintain the display of the dropdown even after choosing a date.