You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using the Calendar component with multiple attribute but there seems to be some weird type errors.
the code looks like this;
<scriptlang="ts">import{typeDateValue}from'@internationalized/date'import{Calendar}from'$lib/components/ui/calendar'lettest: DateValue[]|undefined=[]</script><div><Calendarclass="theme-light"
multiple={true}bind:value={test}
/>
{#each test ?? [] as item, i (i)}
<inputname="dates.{i}.startTime"
type="hidden"
/>
<inputname="dates.{i}.endTime"
type="hidden"
/>
{/each}
</div>
but multiple and bind:value throw these errors Type 'true' is not assignable to type 'false'. and Type 'DateValue[] | undefined' is not assignable to type 'DateValue | undefined'.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i am using the
Calendar
component withmultiple
attribute but there seems to be some weird type errors.the code looks like this;
but
multiple
andbind:value
throw these errorsType 'true' is not assignable to type 'false'.
andType 'DateValue[] | undefined' is not assignable to type 'DateValue | undefined'.
Beta Was this translation helpful? Give feedback.
All reactions