Skip to content

Commit 6e595d4

Browse files
committed
fix(circular-calendar): fix type errors on build
1 parent 5367c1a commit 6e595d4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/experiments/CircularCalendar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script setup lang="ts">
22
import { computed, ref } from 'vue'
33
const currentMonth = ref<number>(1)
4-
const currentDay = ref<number>(1)
5-
const currentYear = ref<Date>(new Date().getFullYear())
4+
const currentDay = ref<number | null>(1)
5+
const currentYear = ref<number>(new Date().getFullYear())
66
const months: string[] = [
77
'January',
88
'February',
@@ -30,7 +30,7 @@ const currentDate = computed(() => {
3030
})
3131
const setMonth = (month: number) => {
3232
currentMonth.value = month
33-
if (currentDays.includes(currentDay.value)) return
33+
if (currentDays.value.includes(currentDay.value)) return
3434
currentDay.value = null
3535
}
3636
const years = () => {

src/views/CircularCalendarView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const codeBlockString: string = `
1515
<script setup lang="ts">
1616
import { computed, ref } from 'vue'
1717
const currentMonth = ref<number>(1)
18-
const currentDay = ref<number>(1)
19-
const currentYear = ref<Date>(new Date().getFullYear())
18+
const currentDay = ref<number | null>(1)
19+
const currentYear = ref<number>(new Date().getFullYear())
2020
const months: string[] = [
2121
'January',
2222
'February',
@@ -44,7 +44,7 @@ const currentDate = computed(() => {
4444
})
4545
const setMonth = (month: number) => {
4646
currentMonth.value = month
47-
if (currentDays.includes(currentDay.value)) return
47+
if (currentDays.value.includes(currentDay.value)) return
4848
currentDay.value = null
4949
}
5050
const years = () => {

0 commit comments

Comments
 (0)