Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker: fix disabled dates for the west hemisphere #7114

Merged
merged 1 commit into from
Sep 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/date-picker/src/basic/month-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions packages/date-picker/src/basic/year-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down