Core Component Types
DatePickerProperties
Complete type definition for all date picker properties.<app-datepicker> component. It includes:
- Min/max date constraints
- Localization and formatting options
- Accessibility labels
- Event handlers
src/typings.ts:36-39
DatePickerMinMaxProperties
Properties for date range constraints.string
Minimum selectable date in ISO format (YYYY-MM-DD)
string
Maximum selectable date in ISO format (YYYY-MM-DD)
src/mixins/typings.ts:6-9
DatePickerMixinProperties
Core configuration properties for the date picker.string
BCP 47 language tag (e.g., “en-US”, “fr-FR”, “ja-JP”)
string | null
Selected date value in ISO format (YYYY-MM-DD)
number
First day of week (0 = Sunday, 1 = Monday, …, 6 = Saturday)
StartView
Initial view to display (“calendar” or “yearGrid”)
string
Comma-separated list of disabled dates (e.g., “2024-01-01, 2024-12-25”)
string
Comma-separated list of disabled weekdays (e.g., “0,6” for Sunday and Saturday)
boolean
Whether to display week numbers
WeekNumberType
Week numbering system (“first-4-day-week”, “first-day-of-year”, “first-full-week”)
todayLabel, nextMonthLabel) are for accessibility and internationalization.
Source: src/mixins/typings.ts:11-31
Event Types
CustomEventDetail
Type map for all custom events dispatched by the date picker.src/typings.ts:17-21
ValueUpdatedEvent
Event detail for value update events.string
The new date value in ISO format
boolean
Whether the update was triggered by keyboard
SupportedKey
The key that triggered the update (if isKeypress is true)
src/typings.ts:80-82
Formatting Types
Formatters
Complete set of date formatters for a locale.src/typings.ts:43-52
View Types
StartView
The initial view mode for the date picker."calendar"- Shows the month calendar view"yearGrid"- Shows the year selection grid
src/typings.ts:63-65
Helper Function Types
MaybeDate
Flexible type for date values that can be in various formats.Dateobjectsnullfor no datenumberfor timestampsstringfor ISO date strings
src/helpers/typings.ts:12
DateValidatorResult
Return type for date validation operations.Date
The validated date or fallback date if invalid
boolean
Whether the input date was valid
src/helpers/typings.ts:7-10
MultiCalendars
Data structure for multiple calendar months.Array
Array of calendar data for each month
CalendarWeekday[]
Weekday header information
Set<number>
Set of all disabled date timestamps across calendars
Set<number>
Set of all disabled weekday numbers
string
Unique key for the calendar configuration
src/helpers/typings.ts:14-17
Navigation Types
SupportedKey
Keyboard keys supported for date navigation.- Arrow keys: Navigate between dates
- Home/End: Jump to start/end of week or month
- PageUp/PageDown: Navigate between months
- Enter/Space: Select date
- Tab: Focus navigation
src/typings.ts:67-78
ToNextSelectableDateInit
Configuration for finding the next selectable date.Date
required
Starting date
SupportedKey
required
Navigation key pressed
number
required
Minimum allowed timestamp
number
required
Maximum allowed timestamp
Set<number>
required
Set of disabled date timestamps
Set<number>
required
Set of disabled weekday numbers (0-6)
src/helpers/typings.ts:35-42
Extended Component Types
DatePickerInputProperties
Properties for the<app-datepicker-input> component.
src/date-picker-input/typings.ts:5
DatePickerDialogProperties
Properties for the<app-datepicker-dialog> component.
string
required
Label for the confirm button
string
required
Label for the dismiss button
string
required
Label for the reset button
() => void
required
Method to show the dialog
() => void
required
Method to hide the dialog
src/date-picker-dialog/typings.ts:7-13
DialogClosingEventDetail
Event detail for dialog closing events.DialogClosingEventDetailAction
The action that closed the dialog:
"set"- User confirmed date selection"cancel"- User dismissed the dialog"reset"- User reset the date picker
src/date-picker-dialog/typings.ts:17-21
Utility Types
Constructor
Type for class constructors.src/utility-typings.ts:8
ChangedProperties
Type for tracking property changes in Lit elements.updated() to track which properties changed.
Source: src/typings.ts:10
InferredFromSet
Utility type to infer the element type from a Set.src/typings.ts:54