mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 10:22:44 +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 startDate = getTime(startDay || now);
|
||||
const start = this.limitDateRange(
|
||||
startDay || now,
|
||||
startDate,
|
||||
minDate,
|
||||
getPrevDay(new Date(maxDate)).getTime()
|
||||
allowSameDay ? startDate : getPrevDay(new Date(maxDate)).getTime()
|
||||
);
|
||||
|
||||
const date = getTime(endDay || now);
|
||||
|
||||
const end = this.limitDateRange(
|
||||
date,
|
||||
allowSameDay ? date : getNextDay(new Date(minDate)).getTime()
|
||||
|
Loading…
x
Reference in New Issue
Block a user