react-date-range icon indicating copy to clipboard operation
react-date-range copied to clipboard

Bug in color fallback values

Open midas-myth opened this issue 11 months ago • 5 comments

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

https://github.com/hypeserver/react-date-range/blob/6f86ccac37ada8d3aa8282c36f38cbf0c0063dcb/src/components/DateRange/index.js#L123

midas-myth avatar Feb 26 '24 17:02 midas-myth

can you assign me this issue

aniruddhapw avatar Apr 01 '24 09:04 aniruddhapw

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

abdelrahmanes avatar May 07 '24 23:05 abdelrahmanes

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

https://github.com/hypeserver/react-date-range/blob/6f86ccac37ada8d3aa8282c36f38cbf0c0063dcb/src/components/DateRange/index.js#L123

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;
}

Gourav-Chouhan avatar May 24 '24 12:05 Gourav-Chouhan

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}
            />

70Ni avatar Jun 08 '24 09:06 70Ni

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

Yuting411 avatar Jul 05 '24 06:07 Yuting411