Skip to content

Commit

Permalink
fix: styling regressions with the v9 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCassiere committed Aug 1, 2024
1 parent ef090ec commit 4240006
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/ui/input-datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ function InputDatePicker({
{children}
<PopoverContent
align={align}
className="max-w-[300px] px-0 pb-1.5 pt-1"
className="w-full max-w-[400px] px-0 pb-1.5 pt-1"
>
{mode === "date" || mode === "datetime" ? (
<Calendar
mode="single"
initialFocus
className="pb-1"
autoFocus
className="p-3"
selected={value}
onSelect={(date) => {
if (!onChange) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export function DateReportFilter(props: ReportFilterProps) {
<PopoverContent className={cn("p-0", "w-auto")} align="start">
<Calendar
mode="single"
autoFocus
className="px-2 py-3"
selected={baseState ? new Date(baseState) : undefined}
today={baseState ? new Date(baseState) : new Date()}
onSelect={(day) => {
Expand All @@ -93,7 +95,6 @@ export function DateReportFilter(props: ReportFilterProps) {

setCriteriaValue(props.accessor, dateFormat(day));
}}
initialFocus
/>
</PopoverContent>
</Popover>
Expand Down
3 changes: 2 additions & 1 deletion src/routes/_auth/-modules/table-list/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ function ToolbarFilter({
{type === "date" && (
<Calendar
mode="single"
className="p-2 pt-3"
autoFocus
selected={
baseState?.value && typeof baseState.value === "string"
? new Date(baseState.value)
Expand All @@ -543,7 +545,6 @@ function ToolbarFilter({
onSelect={(day) => {
handleSaveValue(day, "date");
}}
initialFocus
/>
)}
{type === "text" && (
Expand Down

0 comments on commit 4240006

Please sign in to comment.