mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
DatePicker: fix disabled dates for the west hemisphere
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
var year = this.date.getFullYear();
|
||||
var date = new Date(0);
|
||||
date.setFullYear(year);
|
||||
date.setMonth(month);
|
||||
date.setMonth(month, 1);
|
||||
date.setHours(0);
|
||||
var nextMonth = new Date(date);
|
||||
nextMonth.setMonth(month + 1);
|
||||
|
||||
@@ -63,9 +63,7 @@
|
||||
getCellStyle(year) {
|
||||
const style = {};
|
||||
|
||||
var date = new Date(0);
|
||||
date.setFullYear(year);
|
||||
date.setHours(0);
|
||||
var date = new Date(year, 0, 1, 0);
|
||||
var nextYear = new Date(date);
|
||||
nextYear.setFullYear(year + 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user