Datepicker

Overview

The datepicker allows the user to select a date from a calendar.

Demo

Props

PropertyDescriptionTypeValuesDefaultRequired
labelThe label to show with the inputstringstring
hideLabelHide the labelboolean | undefinedboolean | undefined
nameThe input namestring | undefinedstring | undefined
selectedDateThe start date of the datepicker or range if enabledstring | number | Date | undefinedstring | number | Date | undefined
visibleForces visibility of the datepickerboolean | undefinedboolean | undefined
inlineInlines the datepicker with other elementsboolean | undefinedboolean | undefined
rangeEnables range selectionboolean | undefinedboolean | undefined
rangeSeparatorThe separator for the range selectionstring | undefinedstring | undefined" - "
positionThe position of the datepickerAirDatepickerPosition | undefinedAirDatepickerPosition | undefined"bottom left"
minDateThe minimum date that can be selectedstring | number | Date | undefinedstring | number | Date | undefined
maxDateThe maximum date that can be selectedstring | number | Date | undefinedstring | number | Date | undefined
buttonsButtons to show on the datepicker("today" | "clear")[] | undefined("today" | "clear")[] | undefined
timepickerEnables time selectionboolean | undefinedboolean | undefined
disabledDisable the datepickerboolean | undefinedboolean | undefined
placeholderThe datepicker input placeholderstring | undefinedstring | undefined
requiredWhether the datepicker is requiredboolean | undefinedboolean | undefined
autoCloseIf true the datepicker will be hidden after selecting the dateboolean | undefinedboolean | undefined
formatFormats the date; accepts day.js formatsstring | undefinedstring | undefined"MM/DD/YYYY"
dataValThe input attributes for .NET validationstring | undefinedstring | undefined
dataValRequiredstring | undefinedstring | undefined
hideInitialValuePrevents the datepicker from displaying a value until interacted withboolean | undefinedboolean | undefinedfalse
prevHtmlCustom HTML for the previous month buttonstring | undefinedstring | undefined"<svg fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#a)\"><path d=\"m15.41 7.41-1.41-1.41-6 6 6 6 1.41-1.41-4.58-4.59 4.58-4.59z\" fill=\"#66686a\"/></g><defs><clipPath id=\"a\"><rect width=\"24\" height=\"24\" fill=\"#fff\"/></clipPath></defs></svg>"
nextHtmlCustom HTML for the next month buttonstring | undefinedstring | undefined"<svg fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#a)\"><path d=\"m10 6-1.41 1.41 4.58 4.59-4.58 4.59 1.41 1.41 6-6-6-6z\" fill=\"#323232\"/></g><defs><clipPath id=\"a\"><rect width=\"24\" height=\"24\" fill=\"#fff\"/></clipPath></defs></svg>"
tooltipHtmlCustom HTML for the tooltipstring | undefinedstring | undefined
readonlyInputDisables manual typing in the inputboolean | undefinedboolean | undefined
dataQaIdQA identifier for the inputstring | undefinedstring | undefined

Events

NameReturn Type
date-selected[date?: Date | Date[] | undefined]