{#snippet children({ months, weekdays })} { if (!placeholder) return; if (v === `${placeholder.month}`) return; placeholder = placeholder.set({ month: Number.parseInt(v) }); }} > {monthLabel} {#each monthOptions as { value, label } (value)} {/each} { if (!v || !placeholder) return; if (v === `${placeholder?.year}`) return; placeholder = placeholder.set({ year: Number.parseInt(v) }); }} > {defaultYear?.label ?? 'Select year'} {#each yearOptions as { value, label } (value)} {/each} {#each months as month (month)} {#each weekdays as weekday (weekday)} {weekday.slice(0, 2)} {/each} {#each month.weeks as weekDates (weekDates)} {#each weekDates as date (date)} {/each} {/each} {/each} {/snippet}