Commit dba79741 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

DatePicker: fix disabled dates for the west hemisphere

parent 9f9629d2
...@@ -67,7 +67,7 @@ ...@@ -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);
......
...@@ -63,9 +63,7 @@ ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment