Skip to content

Commit

Permalink
Merge pull request #152 from treadpit/develop
Browse files Browse the repository at this point in the history
fix auto choose  1st of month when switch month
  • Loading branch information
todrfu authored Aug 4, 2019
2 parents e668d71 + 332471e commit e17a02e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/component/calendar/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,10 @@ const conf = {
item.choosed = false;
}
});
const tmp = { 'calendar.days': days };
if (curDate) {
tmp['calendar.selectedDay'] = selectedDay;
}
setData(tmp);
setData({
'calendar.days': days,
'calendar.selectedDay': selectedDay || []
});
},
/**
* 当改变月份时触发
Expand Down Expand Up @@ -1006,8 +1005,6 @@ const conf = {
conf.selectedDayWeekAllDays(day || currentDay);
} else {
Component.weekMode = false;
let { year, month, day } = currentDay;
if (curYear !== year || curMonth !== month) day = 1;
setData({
'calendar.weekMode': false
});
Expand Down

0 comments on commit e17a02e

Please sign in to comment.