Skip to content

Commit

Permalink
Merge branch 'xola:master' into X2-6907
Browse files Browse the repository at this point in the history
  • Loading branch information
shivbang authored Nov 22, 2023
2 parents df583bd + e488200 commit 602fad8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xola/ui-kit",
"version": "2.1.29",
"version": "2.1.30",
"description": "Xola UI Kit",
"license": "MIT",
"files": [
Expand Down
5 changes: 5 additions & 0 deletions src/components/DatePicker/DatePickerPopover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const DatePickerPopover = ({
getDayContent,
...rest
}) => {
const [initialValue] = useState(value);
const [originalValue, setOriginalValue] = useState(value);
const [isVisible, setIsVisible] = useState(false);

Expand All @@ -43,6 +44,10 @@ export const DatePickerPopover = ({
};

const handleClickOutside = () => {
if (!value?.to && variant === "range") {
onChange(initialValue);
}

toggleVisibility();
};

Expand Down

0 comments on commit 602fad8

Please sign in to comment.