fix: type errors for months

This commit is contained in:
Eduard Predescu 2024-04-15 23:12:13 +03:00
parent bb62109ac3
commit cae1e293f9
2 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ import {
} from '@internationalized/date'
import { type DateRange, RangeCalendarRoot, useDateFormatter } from 'radix-vue'
import { createMonth, toDate } from 'radix-vue/date'
import { type Grid, createMonth, toDate } from 'radix-vue/date'
import {
RangeCalendarCell,
RangeCalendarCellTrigger,
@ -48,7 +48,7 @@ const firstMonth = ref(
fixedWeeks: true,
weekStartsOn: 0,
}),
)
) as Ref<Grid<DateValue>>
const secondMonth = ref(
createMonth({
dateObj: secondMonthPlaceholder.value,
@ -56,7 +56,7 @@ const secondMonth = ref(
fixedWeeks: true,
weekStartsOn: 0,
}),
)
) as Ref<Grid<DateValue>>
function updateMonth(reference: 'first' | 'second', months: number) {
if (reference === 'first') {

View File

@ -13,7 +13,7 @@ import {
} from '@internationalized/date'
import { type DateRange, RangeCalendarRoot, useDateFormatter } from 'radix-vue'
import { createMonth, toDate } from 'radix-vue/date'
import { type Grid, createMonth, toDate } from 'radix-vue/date'
import {
RangeCalendarCell,
RangeCalendarCellTrigger,
@ -48,7 +48,7 @@ const firstMonth = ref(
fixedWeeks: true,
weekStartsOn: 0,
}),
)
) as Ref<Grid<DateValue>>
const secondMonth = ref(
createMonth({
dateObj: secondMonthPlaceholder.value,
@ -56,7 +56,7 @@ const secondMonth = ref(
fixedWeeks: true,
weekStartsOn: 0,
}),
)
) as Ref<Grid<DateValue>>
function updateMonth(reference: 'first' | 'second', months: number) {
if (reference === 'first') {