Calendar: Incorrect TypeScript typing of date slot #2703
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
The date slotprop of the calendar is incorrectly typed as
type CalendarValueType = Date | Date[] | undefined;
when the documentation and behavior suggests it is a date representation metadata object with a structure looking more like
{ day: number; month: number; year: number; today: boolean; selectable: boolean }
this causes typescript to throw errors when you use it as intended.
Reproducer
No response
PrimeVue version
3.15.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
make a calendar
attempt to format it something like this
Date | Date[] | undefined
Expected behavior
date slot prop should be typed correctly for its structure
The text was updated successfully, but these errors were encountered: