I have a css styled post that contains a calendar icon at the end of the post. Currently when clicking on any part of the input, it raises a modal with a calendar.
What I have to do now is that the popup is raised only when the calendar icon is clicked, that is, I must detect the click in a certain part within the input. Is it possible to do that?
My html code:
<input matInput formControlName="myDate" class="form-control icon-calendar" type="text" (click)="openModalClendar()">
My css:
.icon-calendar {
background-image: url("/assets/calendar.png");
background-repeat: no-repeat;
background-position-y: center;
background-position-x: calc(100% - 12px);
background-size: 20px;
}
currently the click detects it at the input level, but I need to make it detect it by clicking only the icon
