RangeCalendar
The RangeCalendar control is intended for selecting a date range in a pair of calendars. You can specify the desired start and end dates of the range, switch on/off the Today, Clear and Done buttons and mark a certain date range using a custom style.

Related resources
- Get the widget by installing the
@svar-ui/svelte-corepackage. - Check RangeCalendar API Reference to see the list of configuration properties and events.
- Explore the samples to visualize the available features.
Initialization
To create a RangeCalendar instance on a page, you need to complete two steps:
- import the source file of the control on a page:
<script>
import { RangeCalendar } from "@svar-ui/svelte-core";
</script>
- use the
<RangeCalendar>tag to initialize the control:
<RangeCalendar/>
A default RangeCalendar displays the current date (the left calendar opens at the current month and year and the right one shows the following month of the same year) without any settings added.
Setting the start and end dates of the range
Since the calendars of RangeCalendar are intended to display a date range, you need to specify the start and end dates of the range. There are the start and end API properties, each of which is set as a Date object:
<RangeCalendar
start={new Date(2022, 1, 18)}
end={new Date(2022, 11, 22)} >
<RangeCalendar/>
Related sample: Range Calendar