mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Calendar): valueOf
This commit is contained in:
parent
84b8b086a7
commit
d4f4d75fd9
@ -4,14 +4,11 @@ var utils = require('./utils.wxs');
|
|||||||
function getMonths(minDate, maxDate) {
|
function getMonths(minDate, maxDate) {
|
||||||
var months = [];
|
var months = [];
|
||||||
var cursor = getDate(minDate);
|
var cursor = getDate(minDate);
|
||||||
cursor.setHours(0);
|
|
||||||
cursor.setMinutes(0);
|
|
||||||
cursor.setSeconds(0);
|
|
||||||
|
|
||||||
cursor.setDate(1);
|
cursor.setDate(1);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
months.push(cursor.getTime());
|
months.push(cursor.valueOf());
|
||||||
cursor.setMonth(cursor.getMonth() + 1);
|
cursor.setMonth(cursor.getMonth() + 1);
|
||||||
} while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);
|
} while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user