Skip to main content

DatePicker API Overview

Initialization

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

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

DatePicker Properties

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

DatePicker Events

selectfires when a new date is selected in a date picker