mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Calendar): fix startDay with range type and allow same day
This commit is contained in:
parent
1ad122b9cf
commit
35b199f9f6
@ -211,14 +211,14 @@ VantComponent({
|
|||||||
|
|
||||||
const [startDay, endDay] = defaultDate || [];
|
const [startDay, endDay] = defaultDate || [];
|
||||||
|
|
||||||
|
const startDate = getTime(startDay || now);
|
||||||
const start = this.limitDateRange(
|
const start = this.limitDateRange(
|
||||||
startDay || now,
|
startDate,
|
||||||
minDate,
|
minDate,
|
||||||
getPrevDay(new Date(maxDate)).getTime()
|
allowSameDay ? startDate : getPrevDay(new Date(maxDate)).getTime()
|
||||||
);
|
);
|
||||||
|
|
||||||
const date = getTime(endDay || now);
|
const date = getTime(endDay || now);
|
||||||
|
|
||||||
const end = this.limitDateRange(
|
const end = this.limitDateRange(
|
||||||
date,
|
date,
|
||||||
allowSameDay ? date : getNextDay(new Date(minDate)).getTime()
|
allowSameDay ? date : getNextDay(new Date(minDate)).getTime()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user