enes

Calendar View

Documentation for Calendar View Soon.

MonTueWedThuFriSatSun

Usage

<script>
	import { CalendarView } from 'fluentui-svelte';

	let value = $state(null);
</script>

<CalendarView bind:value onChange={(e, selection) => console.log(selection)} />

Multiple Selection

Set the multiple prop to allow selecting more than one date.

MonTueWedThuFriSatSun

Week Start

Use the weekStart prop to change the first day of the week (0 = Sunday, 1 = Monday).

SunMonTueWedThuFriSat

Component Props

NameTypeDescription
valuebindable Date \| Date[] \| nullThe selected date, or an array of dates when multiple is set.
multiplebooleanAllow selecting more than one date.
view'days' \| 'months' \| 'years'The initial calendar view. Default: 'days'.
minDateDateEarliest selectable date.
maxDateDateLatest selectable date.
localestringLocale used for formatting. Default: 'en-US'.
weekStartnumberThe first day of the week (0 = Sunday). Default: 1.
blackoutDatesDate[]Dates that cannot be selected.
headersobjectHeader configuration for the calendar.
floatingobjectFloating UI configuration to render the calendar as a popup.
onChange(e: Event, selection) => voidCallback fired when the selection changes.
onViewChange(view) => voidCallback fired when the active view changes.
elementbindable HTMLElementThe DOM reference of the calendar view root element.