-
Notifications
You must be signed in to change notification settings - Fork 696
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
All the dates are selected in date range picker when setting startDate and endDate null or empty #360
Comments
+1 |
1 similar comment
+1 |
+1, every day gets the |
Noted the same / similar issue in #330 (comment) with some demos there. |
To work around this I added a class const rdrNoSelection = useMemo(
() => {
const range = ranges?.[0];
return !range || (range.startDate === null && range.endDate === null);
},
[ranges]
); .rdrNoSelection {
.rdrSelected, .rdrInRange, .rdrStartEdge, .rdrEndEdge {
background: #fff;
}
.rdrDay:not(.rdrDayPassive) .rdrInRange ~ .rdrDayNumber span,
.rdrDay:not(.rdrDayPassive) .rdrStartEdge ~ .rdrDayNumber span,
.rdrDay:not(.rdrDayPassive) .rdrEndEdge ~ .rdrDayNumber span,
.rdrDay:not(.rdrDayPassive) .rdrSelected ~ .rdrDayNumber span {
color: $oa-black;
&:after {
background: $oa-blue;
}
}
} |
+1 |
It's an old issue but is there any update? |
where should i add the code? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
All the dates are selected in date range picker when setting startDate and endDate null or empty
[BUG] Bug Reproduce Steps
In DateRangePicker state object, set startDate and endDate as null
[BUG] Expected behaviour
Initially when both of the date textfields are set as blank, none of the date should be selected in the calendar of DRP
Environment
Package Version:
React version:
Node version:
Browser:
The text was updated successfully, but these errors were encountered: