Time estimate card: fix date values

This commit is contained in:
2025-11-13 16:43:15 +03:00
parent 529893be8b
commit 590cc2c5e9
6 changed files with 64 additions and 61 deletions

View File

@@ -6,16 +6,10 @@ import Content from "pages/cart/components/timeEstimate/Content.tsx";
interface EstimateTimeDialogProps {
isOpen: boolean;
onClose: () => void;
onSave: (date: Date, time: string) => void;
initialDate?: Date;
onSave: (date: string, time: string) => void;
}
export function Dialog({
isOpen,
onClose,
onSave,
initialDate = new Date(),
}: EstimateTimeDialogProps) {
export function Dialog({ isOpen, onClose, onSave }: EstimateTimeDialogProps) {
const { t } = useTranslation();
return (
@@ -27,7 +21,7 @@ export function Dialog({
width={500}
destroyOnHidden
>
<Content onSave={onSave} initialDate={initialDate} onClose={onClose} />
<Content onSave={onSave} onClose={onClose} />
</Modal>
);
}