ui: [bug]: datepicker get a wrong css

Describe the bug

Not displayed as expected

Affected component/components

Date Picker

How to reproduce

1.Click on datepicker component

Google Chrome 2024-07-21 20 41 32

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Browsers

Before submitting

  • I’ve made research efforts and searched the documentation
  • I’ve searched for existing issues

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 11
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Did you install the new react-day-picker v9.0.0? That one seems to come with several breaking changes. When using react-day-picker 8.10.1 you will probably be fine for the moment.

@activemonkeys I will try that now. I have v9 installed

Edit : works for me too… big thanks

Did you install the new react-day-picker v9.0.0? That one seems to come with several breaking changes. When using react-day-picker 8.10.1 you will probably be fine for the moment.

It works,Thank you so much!

It seems that react 19 does not support react-day-picker in version 8.10.1, can anyone using react 19 with date-picker tell me how they solved the problem?

The current shadcn/ui does not show the latest version. For a proper integration, please refer to date-picker.luca-felix.com.

You can find this information in the official webpage from daypicker https://daypicker.dev/docs/styling

Did you install the new react-day-picker v9.0.0? That one seems to come with several breaking changes. When using react-day-picker 8.10.1 you will probably be fine for the moment.

Thank You! it’s work 👍

Currently shadcn requires react-day-picker v8, it doesn’t work with react-day-picker v9.

If for some reason, you want to use v9 in your code and let shadcn using v8, you can install both version from npm using aliases

https://medium.com/weekly-webtips/how-to-install-multiple-versions-of-the-same-package-in-npm-71c29b12e253

I have been battling this for the past 12hrs no cap. Since I am not very familiar with shadcn and react components, I was under the assumption I am doing something wrong. I am also getting some errors after installing calendar. Caption does not seem to exist in type partial < classnames > . I can’t also seem to find it any where after navigating through the UI types where something like caption _label can be found. Same thing for iconLeft which is suppose to exist in partial < customComponents >

You should run the below command

npm i react-day-picker@8.10.1