Skip to content
Snippets Groups Projects
Unverified Commit b5b61d44 authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

fix selected state in single date widget (#11955)

DateSingleWidget wasn't explicitly setting itself to not be a range
picker nor were we checking that prop in the css class we applied which
resulted in an inconsistent selected state in the single date widget.
parent bbbeeef1
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,10 @@ export default class Calendar extends Component {
return (
<div
className={cx("Calendar Grid-cell", {
"Calendar--range": this.props.selected && this.props.selectedEnd,
"Calendar--range":
this.props.isRangePicker &&
this.props.selected &&
this.props.selectedEnd,
})}
>
{this.renderMonthHeader(current, side)}
......
......@@ -11,6 +11,7 @@ const DateSingleWidget = ({ value, setValue, onClose }) => {
initial={value}
selected={value}
selectedEnd={value}
isRangePicker={false}
onChange={value => {
setValue(value);
onClose();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment