Skip to main content

DateRangePicker API Overview

Initialization

<script>
import { DateRangePicker } from "wx-svelte-core";
</script>

<!-- minimal configuration for initialization -->
<DateRangePicker />
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.

DateRangePicker Properties

alignspecifies the alignment of a popup with calendars relative to the input field
buttonsshows/hides the Today and Clear buttons in the lower part of the popup with calendars
csschanges the position of the icon in the input
disableddefines whether a date range picker is disabled
doneshows/hides the Done button
editabledefines whether a date range picker is editable or sets a custom format for editing dates
errordefines whether error styling is applied to a date range picker
formatsets the date format for a date range picker input
idsets an HTML id for a date range picker
monthssets the number of calendars in DateRangePicker
placeholdersets the text of the input's placeholder
titlesets a tooltip text with additional info about the control
valuesets the value of a date range picker
widthsets the width of a popup with calendars

DatePicker Events

selectfires when a new option is selected in a date range picker