I have used HTML input with the date field in the Angular application.I would like to open the date field modal on page load based on a condition without using jquery. The condition is when the input is having a date selected then the calendar shouldn't be opened and if there is no date selected then the dropdown should be opened.
I have tried setting onLoad in the HTML tag but i'm not sure how to close/open the calendar modal.
<input
[class.is-invalid]="deliveryDate.invalid && deliveryDate.touched"
type="date"
class="form-control"
[ngClass]="{'alerts-border': isDateSelected()}"
[min]="cartItems.minDeliveryDate"
formControlName="delivery_date"
onkeydown="return false"
/>