diff --git a/components/my-components/my-date-pickerview.vue b/components/my-components/my-date-pickerview.vue index 0e1d466..0ea73ad 100644 --- a/components/my-components/my-date-pickerview.vue +++ b/components/my-components/my-date-pickerview.vue @@ -389,9 +389,10 @@ const year = years[arr[0]] const month = arr[1] + 1 const day = arr[2] + 1 - const hour = ('0' + arr[3]).slice(-2) - const min = ('0' + arr[4]).slice(-2) - const sen = ('0' + arr[5]).slice(-2) + const hour = ('0' + (arr[3]||0)).slice(-2) + console.log(hour) + const min = ('0' + (arr[4]||0)).slice(-2) + const sen = ('0' + (arr[5]||0)).slice(-2) if (isObj) { return new Date(year, month, day, hour, min, sen) } @@ -400,6 +401,7 @@ function confirm(e) { + console.log(value.value); const start = returnDateString(value.value) console.log(start); const end = returnDateString(value1.value)