feat(Calendar): add max-range、range-prompt prop (#5583)

This commit is contained in:
KongYe
2020-01-15 16:34:13 +08:00
committed by neverland
parent cfd40f2eaf
commit 670b346963
11 changed files with 45 additions and 8 deletions
+6
View File
@@ -42,3 +42,9 @@ export function getNextDay(date: Date) {
return date;
}
export function calcDateNum(date: [Date, Date]) {
const day1 = date[0].getTime();
const day2 = date[1].getTime();
return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
}