I'm using p-calendar
in my app to take input from the user for a particular time. The calendar works fine. However even when I click on some other date on the calendar, the current date also remains selected in the calendar. So even though the new date has been selected, it looks like as if both are selected. How can I fix this? Thanks in advance for your help.
Here is my template:
<div class="p-field p-col-12 p-md-4">
<p-calendar [defaultDate]="null" [showButtonBar]="true" [maxDate]="maxDateValue" [readonlyInput]="true" [(ngModel)]="date7" [showTime]="true" [inline]="true" inputId="time"></p-calendar>
</div>
<span style="font-size: small;"> Selcted Time::</span><span style="font-size: small;"><u>{{date7}}</u></span>
The value in date7 is the newly selected date which is as expected however the calendar shows both dates as selected.