Skip to content

Commit

Permalink
Merge pull request #33 from garf/master
Browse files Browse the repository at this point in the history
Allow same date range
  • Loading branch information
ManukMinasyan authored Oct 16, 2019
2 parents e19bc42 + def0681 commit 3127c2b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/FunctionalCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@
// Start Date not empty, chose date > start date
} else if (this.calendar.dateRange.end.date === false && (clickDate > startDate)) {
this.calendar.dateRange.end.date = item.date;
// Start date not empty, chose date < start date
} else if (this.calendar.dateRange.start.date !== false && (clickDate < startDate)) {
// Start date not empty, chose date <= start date (also same date range select)
} else if (this.calendar.dateRange.start.date !== false && (clickDate <= startDate)) {
this.calendar.dateRange.end.date = this.calendar.dateRange.start.date;
this.calendar.dateRange.start.date = item.date;
}
Expand Down Expand Up @@ -582,6 +582,11 @@
day.isMarked = true;
}
if (startDate && startDate === endDate) {
day.isMouseToLeft = false
day.isMouseToRight = false
}
if (startDate && endDate) {
if (helpCalendar.getDateFromFormat(day.date).getTime() > helpCalendar.getDateFromFormat(startDate)
&& helpCalendar.getDateFromFormat(day.date) < helpCalendar.getDateFromFormat(endDate)) {
Expand Down

1 comment on commit 3127c2b

@vercel
Copy link

@vercel vercel bot commented on 3127c2b Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.