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

[BUG] - DateRangePicker with custom primary color not work #4564

Open
dodolereporter opened this issue Jan 15, 2025 · 1 comment
Open

[BUG] - DateRangePicker with custom primary color not work #4564

dodolereporter opened this issue Jan 15, 2025 · 1 comment

Comments

@dodolereporter
Copy link

NextUI Version

10.1.0

Describe the bug

Hello,
I am using this version of the NextUI Date Picker: 2.3.9.
The issue occurs when I change the primary color in the Tailwind config. The DateRangePicker no longer displays the selected day or the selected "range."

tailwind.config.js

import {nextui} from '@nextui-org/theme'

/** @type {import("tailwindcss").Config} */
module.exports = {
    content: [
        "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
        "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
        "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
        "./src/**/*.{html,js}",
        "./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
    ],
    darkMode: "class",
    plugins: [nextui({
        themes: {
            light: {
                colors: {
                    primary: "#226891",
                    secondary: "#85C595"
                }
            },
            dark: {
                colors: {
                    primary: "#226891",
                    secondary: "#85C595"
                }
            }
        }
    }),
        require("tailwindcss-animated")
    ]
};

Component

 <DateRangePicker
            hideTimeZone
            defaultValue={{
              start: parseZonedDateTime(
                formatToZonedDateTimeToday(eightDaysAgo),
              ),
              end: parseZonedDateTime(formatToZonedDateTime(tomorrow)),
            }}
            label="Période"
            visibleMonths={2}
          />

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Update the primary color in the Tailwind plugin configuration.
  2. Observe that the DateRangePicker no longer displays the selected day or the range.

Expected behavior

The DateRangePicker should display the selected day and the range correctly, even after changing the primary color in the Tailwind plugin configuration.

Screenshots or Videos

image

Operating System Version

Windows

Browser

Chrome

Copy link

linear bot commented Jan 15, 2025

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

No branches or pull requests

1 participant