Open this example in the interactive library
Live preview
Source code
// components/WeeklyRecurrenceDates.tsx
export default function WeeklyRecurrenceDates({
day = "2028-02-29",
}: { day?: string } = {}) {
return (
<ol>
{Array.from({ length: 4 }, (_, i) => (
<li key={i}>
{new Date(Date.parse(day) + i * 7 * 86400000).toISOString().slice(0, 10)}
</li>
))}
</ol>
);
}
