I am currently working on implementing p-calendar from ng-prime along with ngmodel for binding a date retrieved from the server
<p-calendar [(ngModel)]="selectedDate"
[locale]="es"
[hidden]="!editing"
dateFormat="d/mm/yy"
appendTo="body"
class="pos-cal mar-left-txt"
[(ngModel)]="currentUserData.person.dateOfBirth">
</p-calendar>
<p [hidden]="editing">
{{currentUserData.person.dateOfBirth | date: 'dd/MM/yyyy'}}
</p>
Although this code achieves my desired outcome, I have encountered one issue. The selected date is being set as today's date instead of the date of birth I want to display in the p-calendar component.
When I pick a date from the calendar, it correctly binds to the paragraph below. While I would typically use a pipe for this purpose, it has not proven successful in this scenario.