File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { computed , ref } from ' vue'
33const 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 ())
66const months: string [] = [
77 ' January' ,
88 ' February' ,
@@ -30,7 +30,7 @@ const currentDate = computed(() => {
3030})
3131const 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}
3636const years = () => {
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ const codeBlockString: string = `
1515<script setup lang="ts">
1616import { computed, ref } from 'vue'
1717const 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())
2020const months: string[] = [
2121 'January',
2222 'February',
@@ -44,7 +44,7 @@ const currentDate = computed(() => {
4444})
4545const 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}
5050const years = () => {
You can’t perform that action at this time.
0 commit comments