a tool for shared writing and social publishing

open calendars to corrent months and times by default

+3 -2
+2 -2
app/[leaflet_id]/publish/PublishPost.tsx
··· 251 251 ); 252 252 253 253 const [timeValue, setTimeValue] = useState<string>(() => { 254 - if (!props.publishedAt) return "12:00"; 255 - return `${props.publishedAt.getHours().toString().padStart(2, "0")}:${props.publishedAt.getMinutes().toString().padStart(2, "0")}`; 254 + const date = props.publishedAt || new Date(); 255 + return `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}`; 256 256 }); 257 257 258 258 let currentTime = `${new Date().getHours().toString().padStart(2, "0")}:${new Date().getMinutes().toString().padStart(2, "0")}`;
+1
components/DatePicker.tsx
··· 44 44 }} 45 45 mode="single" 46 46 selected={selected} 47 + defaultMonth={selected} 47 48 onSelect={onSelect} 48 49 disabled={disabled} 49 50 />