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 in color fallback values #642

Open
midas-myth opened this issue Feb 26, 2024 · 5 comments
Open

Bug in color fallback values #642

midas-myth opened this issue Feb 26, 2024 · 5 comments

Comments

@midas-myth
Copy link

Hi, there seems to be a bug, as there is no color in scope

const color = ranges[focusedRange[0]]?.color || rangeColors[focusedRange[0]] || color;

@aniruddhapw
Copy link

can you assign me this issue

@abdelrahmanes
Copy link

Yeah, I have the same issue,
it throws
Uncaught ReferenceError: Cannot access 'color' before initialization

@Gourav-Chouhan
Copy link

Hi, there seems to be a bug, as there is no color in scope

const color = ranges[focusedRange[0]]?.color || rangeColors[focusedRange[0]] || color;

If you want to just see the date ranges and not interact with it, you can disable pointer events for that div.

.rdrMonth {
  pointer-events: none !important;
}

@70Ni
Copy link

70Ni commented Jun 8, 2024

Found this solution:

Copy the code from the preview: https://hypeserver.github.io/react-date-range/#calendar

  <DateRange
              editableDateInputs={true}
              onChange={(item) => setState([item.selection])}
              moveRangeOnFirstSelection={false}
              ranges={state}
            />

@Yuting411
Copy link

@70Ni
Thank you for your suggestion. The method you provided was helpful.

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

6 participants