diff --git a/packages/vuetify/src/components/VDatePicker/VDatePicker.tsx b/packages/vuetify/src/components/VDatePicker/VDatePicker.tsx
index e66f3b555bc..55c2e0c5b72 100644
--- a/packages/vuetify/src/components/VDatePicker/VDatePicker.tsx
+++ b/packages/vuetify/src/components/VDatePicker/VDatePicker.tsx
@@ -320,6 +320,7 @@ export const VDatePicker = genericComponent
) : viewMode.value === 'year' ? (
,
+ max: null as any as PropType,
modelValue: Number,
+ year: Number,
}, 'VDatePickerMonths')
export const VDatePickerMonths = genericComponent()({
@@ -47,12 +52,20 @@ export const VDatePickerMonths = genericComponent()({
const months = computed(() => {
let date = adapter.startOfYear(adapter.date())
-
+ if (props.year) {
+ date = adapter.setYear(date, props.year)
+ }
return createRange(12).map(i => {
const text = adapter.format(date, 'monthShort')
+ const isDisabled =
+ !!(
+ (props.min && adapter.isAfter(adapter.startOfMonth(adapter.date(props.min)), date)) ||
+ (props.max && adapter.isAfter(date, adapter.startOfMonth(adapter.date(props.max))))
+ )
date = adapter.getNextMonth(date)
return {
+ isDisabled,
text,
value: i,
}
@@ -75,6 +88,7 @@ export const VDatePickerMonths = genericComponent()({
const btnProps = {
active: model.value === i,
color: model.value === i ? props.color : undefined,
+ disabled: month.isDisabled,
rounded: true,
text: month.text,
variant: model.value === month.value ? 'flat' : 'text',