[Feature Request] VDatePicker: Distinguish out-of-range dates versus allowed dates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 41k
- Forks
- 7.1k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 11
Description
Problem to solve
When using the min and max props with allowed-dates, any date that isn't selectable, whether because it falls outside the range or because allowedDates(date) returns false, is rendered with the same "disabled" style. This makes it impossible to differentiate visually:
- Out-of-range (
< minor> max) - In-range but not allowed (within
min/max, but filtered out byallowed-dates)
You can observe the allowed-dates example in the VDatePicker Vuetify documentation.
Proposed solution
Have v-date-picker apply two separate CSS classes (and document them) so consumers can target each case:
- Dates outside
min/max
- Class:
v-date-picker-date--out-of-range
- Dates inside the range but disallowed by
allowed-dates
- Class:
v-date-picker-date--not-allowed
Optionally, expose corresponding named slots or props, but at a minimum, distinct classes will let us write custom styles:
.v-date-picker-date--out-of-range {
opacity: 0.4;
}
.v-date-picker-date--not-allowed {
text-decoration: line-through;
color: rgba(255, 0, 0, 0.7);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the VDatePicker implementation and the allowed-dates documentation example. Trace how min/max and allowed-dates currently mark dates, then add and document distinct classes for out-of-range and in-range disallowed dates; done means consumers can style the two cases separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100