Skip to content

<Datepicker> Theme docs missing keys #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yzidanNqood opened this issue Jan 2, 2024 · 3 comments
Closed

<Datepicker> Theme docs missing keys #1210

yzidanNqood opened this issue Jan 2, 2024 · 3 comments
Labels
📚 documentation Improvements or additions to documentation
Milestone

Comments

@yzidanNqood
Copy link

Using the Theme here:https://www.flowbite-react.com/docs/components/datepicker#theme

i managed to change the UI of the Calendar but i cannot control the Input itself

@tulup-conner
Copy link
Collaborator

Hi there, I don't think it's in the documentation (that's a bug) but you can alter the theme for the <input> itself: https://github.com/themesberg/flowbite-react/blob/main/src/components/Datepicker/Datepicker.tsx#L31

<Datepicker theme={{
  root: {
    input: "bg-pink-800"
  }
}} />

You can also use className if you find it easier:

<Datepicker className="[&_input]:bg-pink-800" />

I'm updating your issue to point out that we can't see this root.input key in the Datepicker Theme docs. Not sure why that's happening.

@tulup-conner tulup-conner added the 📚 documentation Improvements or additions to documentation label Jan 2, 2024
@tulup-conner tulup-conner added this to the 1.0.0 milestone Jan 2, 2024
@tulup-conner tulup-conner changed the title How to customize the Input of Datepicker Component? <Datepicker> Theme docs missing keys Jan 2, 2024
@yzidanNqood
Copy link
Author

className="[&_input]:bg-pink-800"

the

<Datepicker theme={{
  root: {
    input: "bg-pink-800"
  }
}} />

is not working but using the className is working

@SutuSebastian
Copy link
Collaborator

Fixed by #1498 in [email protected] release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants