primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.3k stars 4.56k forks source link

Component: pCalendar: Date becomes empty string if dataType="string is specified #14574

Open fraras opened 8 months ago

fraras commented 8 months ago

Describe the bug

When changing a date inside a table with the p-calendar component, if the dataType="string" is specified the [(ngModel)] of the component returns an empty string instead of the date.

Environment

Angular

Reproducer

https://stackblitz.com/edit/github-y9uamu-cbuqcz?file=src%2Fapp%2Fapp.component.html

Angular version

17.0.7

PrimeNG version

17.3.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.17.0

Browser(s)

Chrome 120.0.6099.217

Steps to reproduce the behavior

  1. Build a p-table
  2. Add a p-calendar component into an editable field of the table
  3. Add the property dataType="string"
  4. Define the dates in the model as string
  5. Click on the date to open the Calendar

Expected behavior

The dates in the Date (Data Type String) column should be maintained in the calendar input box when clicked.

bhardwajsuresh commented 8 months ago

Same issue with everyone with v17.4.0 as well. This should be fixed asap

fbobbio commented 4 months ago

Any news here?

fbobbio commented 4 months ago

Any news here?

Apparently solved. Upgraded primeng to 17.17.0 and "@ngx-formly/primeng": "^6.2.2"

My angular version 17.0.6