Skip to content
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

Theme not applying to Datepicker views #968

Closed
2 tasks done
congon4tor opened this issue Sep 17, 2023 · 0 comments · Fixed by #970
Closed
2 tasks done

Theme not applying to Datepicker views #968

congon4tor opened this issue Sep 17, 2023 · 0 comments · Fixed by #970

Comments

@congon4tor
Copy link
Contributor

  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Steps to reproduce

  1. Add a Datepicker to a page
  2. Set a custom theme that modifies any object in the views field. This example should set the selected day background to red
{
  views: {
    days: {
      header: {
        base: "grid grid-cols-7 mb-1",
        title:
          "dow h-6 text-center text-sm font-medium leading-6 text-neutral-500 dark:text-neutral-400",
      },
      items: {
        base: "grid w-64 grid-cols-7",
        item: {
          base: "block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-neutral-900 hover:bg-neutral-100 dark:text-white dark:hover:bg-neutral-600 ",
          selected:
            "bg-red-700 text-white hover:bg-red-600",
          disabled: "text-neutral-500",
        },
      },
    },
  }
}

Current behavior

The custom theme is not getting applied to the views. With the example above the selected date will continue to have a cyan background.

Expected behavior

The theme should be applied and in the example above the background should be red

Context

I'm trying to change the style of the datepicker

congon4tor added a commit to congon4tor/flowbite-react that referenced this issue Sep 17, 2023
This change fixes the issue with the custom themes not being applied to the Datepicker views and
adds a callback function in order to be able to get the selected date

fix themesberg#968 themesberg#964
congon4tor added a commit to congon4tor/flowbite-react that referenced this issue Sep 19, 2023
This change fixes the issue with the custom themes not being applied to the Datepicker views and
adds a callback function in order to be able to get the selected date

fix themesberg#968 themesberg#964
rluders pushed a commit that referenced this issue Sep 19, 2023
This change fixes the issue with the custom themes not being applied to the Datepicker views and
adds a callback function in order to be able to get the selected date

fix #968 #964
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant