Skip to content

Commit

Permalink
feat: place the popover on top always
Browse files Browse the repository at this point in the history
  • Loading branch information
mgierada committed Jun 16, 2024
1 parent 18a5c39 commit 1e9fa3a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/src/components/Callendar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {

const Callendar = ({ className, lastTimeReseted, currentCouterValue }) => {
const [date, setDate] = React.useState({
from: lastTimeReseted || new Date(2024, 4, 13),
from: lastTimeReseted ? new Date(lastTimeReseted) : new Date(2024, 4, 13),
to: addDays(new Date(2024, 4, 13), currentCouterValue),
});
return (
Expand Down Expand Up @@ -45,7 +45,12 @@ const Callendar = ({ className, lastTimeReseted, currentCouterValue }) => {
)}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="start">
<PopoverContent
className="w-auto p-0"
align="center"
side="top"
sideOffset={10}
>
<Calendar
initialFocus
mode="range"
Expand Down

0 comments on commit 1e9fa3a

Please sign in to comment.