Components

Date Picker ​

Date pickers wrap a field and calendar trigger into a single input pattern for choosing one date.

Basic Usage ​

Use a controlled value when the chosen date needs to stay in sync with surrounding form state.

States ​

Show required (with clear), invalid, and disabled states when the picker is used inside forms.

Constraints ​

Bound selectable days with disable-past / disable-future, weekday rules, and min / max.

Range ​

mode="range" with months="2" for a two-month booking-style picker.

Multiple ​

mode="multiple" lets users toggle several individual dates. The panel stays open while selecting, the control shows a count summary, and the value is a comma-separated, sorted list of ISO dates.

Date and Time ​

Compose pk-date-picker with pk-time-picker side by side; combine the values in your app code.

API ​

Slots ​

NameDescription
label—
instructions—
hint—
start—
end—
clear-icon—
expand-icon—
footer—

Attributes & Properties ​

NameDescription
ariaLabel aria-labelType string | null
Default null
customError custom-errorCustom validation message; also settable via setCustomValidity().
Type string | null
Default null
defaultValue default-valueType string
disabledDisables the control and excludes it from constraint validation.
Type boolean
Default false
disabledDates disabled-datesType string
disabledDaysOfWeek disabled-days-of-weekType string
disableFuture disable-futureType boolean
Default false
disablePast disable-pastType boolean
Default false
firstDayOfWeek first-day-of-weekType 'auto' | 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'
Default auto
instructionsType string
invalidType boolean
Default false
labelType string
localeType string
maxType string
maxRange max-rangeType number
Default 0
minType string
minRange min-rangeType number
Default 0
modeType PkDatePickerMode
Default single
monthsType 1 | 2
Default 1
nameName submitted with form data.
Type string | null
Default null
openType boolean
Default false
pageBy page-byType 'months' | 'single'
Default months
placeholderType string
placementType PkPopupPlacement
Default bottom
readonlyType boolean
Default false
requiredMarks the control as required for form submission.
Type boolean
Default false
sideOffset side-offsetType number
Default 4
sizeType PkDatePickerSize
Default default
valueType string | Date
weekdayFormat weekday-formatType 'narrow' | 'short' | 'long' | undefined
widthWhen full, the control stretches to the host width.
Type 'full' | undefined
withClear with-clearType boolean
Default false
withInstructions with-instructionsType boolean
Default false
withLabel with-labelType boolean
Default false
withOutsideDays with-outside-daysType boolean
Default true
withWeekNumbers with-week-numbersType boolean
Default false

Methods ​

NameDescription
checkValidity()Runs constraint validation without showing the browser UI.
hide()—
reportValidity()Runs constraint validation and shows the browser UI when invalid.
resetValidity()Clears custom errors and re-syncs validity state.
setCustomValidity(message: string)Sets or clears a custom validation message.
show()—

Events ​

NameDescription
change—
input—
pk-change—
pk-clear—

Custom States ​

NameDescriptionCSS selector
disabledThe control is disabled.:state(disabled)
invalidThe control currently fails constraint validation.:state(invalid)
optionalThe control is not required.:state(optional)
requiredThe control is required.:state(required)
user-invalidInvalid after the user has interacted with the control.:state(user-invalid)
user-validValid after the user has interacted with the control.:state(user-valid)
validThe control currently passes constraint validation.:state(valid)

Dependencies ​

This component registers the following elements when it loads.

NameDescription
pk-popup—
Edit this page
Last updated: Sep 9, 2026, 7:18 PM