shadcn-date-picker
shadcn-date-picker copied to clipboard
Error: Do not pass children as props
There is an error while building:
./components/ui/calendar.tsx
227:13 Error: Do not pass children as props. Instead, nest children between the opening and closing tags.
It is related to this
<MonthGrid
children={children} // <======
className={className}
displayYears={displayYears}
startMonth={startMonth}
endMonth={endMonth}
navView={navView}
setNavView={setNavView}
{...props}
/>
You can just change it to this and it will be ok. Sorry for not making a PR, just feel a bit lazy
<MonthGrid
className={className}
displayYears={displayYears}
startMonth={startMonth}
endMonth={endMonth}
navView={navView}
setNavView={setNavView}
{...props}
>
{children}
</MonthGrid>