diff --git a/client/components/new-post/index.tsx b/client/components/new-post/index.tsx index 604d03d0..a26b727b 100644 --- a/client/components/new-post/index.tsx +++ b/client/components/new-post/index.tsx @@ -163,6 +163,28 @@ const Post = () => { } }, [title]) + const CustomTimeInput = ({ date, value, onChange }: { + date: Date, + value: string, + onChange: (date: string) => void + }) => ( + { + if (!isNaN(date.getTime())) { + onChange(e.target.value || date.toISOString().slice(11, 16)) + } + }} + style={{ + backgroundColor: 'var(--bg)', + border: '1px solid var(--light-gray)', + borderRadius: 'var(--radius)' + }} + required + /> + ); + return (