fix(Calendar): valueOf

This commit is contained in:
nemo-shen 2021-12-14 00:15:21 +08:00 committed by neverland
parent 84b8b086a7
commit d4f4d75fd9

View File

@ -4,14 +4,11 @@ var utils = require('./utils.wxs');
function getMonths(minDate, maxDate) {
var months = [];
var cursor = getDate(minDate);
cursor.setHours(0);
cursor.setMinutes(0);
cursor.setSeconds(0);
cursor.setDate(1);
do {
months.push(cursor.getTime());
months.push(cursor.valueOf());
cursor.setMonth(cursor.getMonth() + 1);
} while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);