hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.57k stars 658 forks source link

Bug in color fallback values #642

Open midas-myth opened 4 months ago

midas-myth commented 4 months ago

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

aniruddhapw commented 3 months ago

can you assign me this issue

abdelrahmanes commented 1 month ago

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

Gourav-Chouhan commented 1 month ago

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;
}
70Ni commented 3 weeks ago

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