Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants