From 65dc73e3cf70946d754c4fc05237d48399c8f7ed Mon Sep 17 00:00:00 2001 From: nikogu <644506165@qq.com> Date: Tue, 31 Oct 2017 15:39:44 +0800 Subject: [PATCH] fixed time select invalid in safari --- src/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index 083875de..297927ef 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -42,7 +42,7 @@ export function getTimeDistance(type) { const nextYear = nextDate.year(); const nextMonth = nextDate.month(); - return [moment(`${year}-${fixedZero(month + 1)}-01 00:00:00`), moment(new Date(`${nextYear}-${fixedZero(nextMonth + 1)}-01 00:00:00`).getTime() - 1000)]; + return [moment(`${year}-${fixedZero(month + 1)}-01 00:00:00`), moment(moment(`${nextYear}-${fixedZero(nextMonth + 1)}-01 00:00:00`).valueOf() - 1000)]; } if (type === 'year') { -- GitLab