DatePicker: fix disabled dates for the west hemisphere

This commit is contained in:
Leopoldthecoder 2017-09-20 11:47:15 +08:00 committed by 杨奕
parent 9f9629d2bb
commit dba797416e
2 changed files with 2 additions and 4 deletions

View File

@ -67,7 +67,7 @@
var year = this.date.getFullYear(); var year = this.date.getFullYear();
var date = new Date(0); var date = new Date(0);
date.setFullYear(year); date.setFullYear(year);
date.setMonth(month); date.setMonth(month, 1);
date.setHours(0); date.setHours(0);
var nextMonth = new Date(date); var nextMonth = new Date(date);
nextMonth.setMonth(month + 1); nextMonth.setMonth(month + 1);

View File

@ -63,9 +63,7 @@
getCellStyle(year) { getCellStyle(year) {
const style = {}; const style = {};
var date = new Date(0); var date = new Date(year, 0, 1, 0);
date.setFullYear(year);
date.setHours(0);
var nextYear = new Date(date); var nextYear = new Date(date);
nextYear.setFullYear(year + 1); nextYear.setFullYear(year + 1);