shadcn-date-picker icon indicating copy to clipboard operation
shadcn-date-picker copied to clipboard

Error: Do not pass children as props

Open ebulku opened this issue 10 months ago • 1 comments

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}
  />

ebulku avatar Jun 26 '25 16:06 ebulku

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>

ebulku avatar Jun 26 '25 16:06 ebulku