Revert "Merge pull request 'Complete Housekeeping migration and /ase cutover' (#52) from codex/housekeeping-complete into main"

This reverts commit 488b6e57c4, reversing
changes made to b506b4499a.
This commit is contained in:
2026-08-30 21:31:34 +02:00
parent 488b6e57c4
commit b1ddda66ff
802 changed files with 61370 additions and 76659 deletions
+45
View File
@@ -0,0 +1,45 @@
"use client";
import { cn } from "@/lib/utils";
interface DateTimePickerProps {
value?: Date | string | null;
onChange: (date: Date | null) => void;
placeholder?: string;
disabled?: boolean;
className?: string;
showTime?: boolean;
}
function inputValue(
value: Date | string | null | undefined,
showTime: boolean,
): string {
if (!value) return "";
const date = value instanceof Date ? value : new Date(value);
if (Number.isNaN(date.getTime())) return "";
const local = new Date(date.getTime() - date.getTimezoneOffset() * 60_000);
return local.toISOString().slice(0, showTime ? 16 : 10);
}
export function DateTimePicker({
value,
onChange,
placeholder,
disabled = false,
className,
showTime = true,
}: DateTimePickerProps) {
return (
<input
aria-label={placeholder ?? (showTime ? "Date and time" : "Date")}
className={cn("w-full", className)}
disabled={disabled}
type={showTime ? "datetime-local" : "date"}
value={inputValue(value, showTime)}
onChange={(event) =>
onChange(event.target.value ? new Date(event.target.value) : null)
}
/>
);
}