primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Calendar: No longer allows modelValue: string

Open joemaylor opened this issue 9 months ago • 0 comments

Describe the bug

https://github.com/primefaces/primevue/issues/3609 was reported and fixed in https://github.com/primefaces/primevue/pull/4972, however this seems to have removed the option of passing a string representation of a date to the Calendar component.

Was this intentional? The implementation in Calendar.vue doesn't seem to have changed, in that it still accommodates the string type, e.g. https://github.com/primefaces/primevue/blob/master/components/lib/calendar/Calendar.vue#L2794

Throws TS Error:

<Calendar model-value="2024-07-01" />

Reproducer

https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template-jggflg?file=src%2FApp.vue,package.json

PrimeVue version

3.52.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to reproduction
  2. Run npm run type-check
  3. TS throws an error

Expected behavior

Should show no typescript errors.

joemaylor avatar Apr 29 '24 09:04 joemaylor