Week Numbers
Display ISO week numbers alongside calendar dates for business and planning applications.Enabling Week Numbers
- Lit Template
- JavaScript
- HTML
Week Number Types
The component supports different week numbering systems:The
first-4-day-week type follows ISO 8601, where week 1 is the first week with at least 4 days in the new year.View week number type definition
View week number type definition
From
src/mixins/date-picker-mixin.ts:39:Customizing Week Number Labels
View default week labels
View default week labels
From
src/constants.ts:12-15:Disabled Dates
Prevent selection of specific dates (holidays, blackout dates, unavailable dates).Single and Multiple Dates
View how disabled dates are processed
View how disabled dates are processed
From The
src/date-picker/date-picker.ts:126-127:splitString helper splits the comma-separated string and converts each value using toResolvedDate.Using with Template Literals
Dynamic Disabled Dates
Disabled Days of Week
Disable specific days of the week (e.g., weekends, specific business days).Basic Usage
Day numbers follow JavaScript’s
Date.getDay() convention: 0 = Sunday, 1 = Monday, …, 6 = Saturday.Common Patterns
- Weekends Only
- Weekdays Only
- Business Days
View how disabled days are processed
View how disabled days are processed
From The
src/date-picker/date-picker.ts:127-128:splitString helper converts comma-separated day numbers to an array of numbers.Date Range Constraints
Limit selectable dates to a specific range usingmin and max properties.
Basic Range
Dynamic Ranges
Default Range Values
View default min/max dates
View default min/max dates
From
src/constants.ts:16 and src/date-picker/date-picker.ts:256-257:Combining Constraints
Start View Configuration
Control which view the calendar opens to:View available start views
View available start views
From
src/constants.ts:22:Use Cases
- Birth Date
- Recent Date
View Switching
Users can switch between views by clicking the year/month dropdown button:View switch implementation
View switch implementation
From
src/date-picker/date-picker.ts:223-225:Value Clamping
When setting a value outside themin/max range, it’s automatically clamped:
View clamping implementation
View clamping implementation
From
src/date-picker/date-picker.ts:419-421:Navigation Constraints
Navigation buttons are automatically hidden when at min/max boundaries:Complete Advanced Example
Here’s a complete example combining multiple advanced features:Keyboard Navigation
The component supports full keyboard navigation:Accessibility Features
- Full keyboard navigation support
- ARIA labels for all interactive elements
- Screen reader announcements for date changes
- Focus management for optimal navigation
- High contrast mode support
Performance Considerations
Next Steps
API Reference
Complete property and method documentation
Basic Usage
See more usage patterns and examples