Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions .firebase/hosting.YnVpbGQ.cache

This file was deleted.

6 changes: 4 additions & 2 deletions src/components/Events/EventForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class EventForm extends Component {
'weeks'
)

if (moment(formApi.getValue('startDate')) > advancedBookingMax) {
if (moment(formApi.getValue('startDate')).isAfter(advancedBookingMax, 'weeks')) {
return (
'Bookings must be made max ' +
maxWeeksInAdvanceForBooking +
Expand All @@ -125,7 +125,9 @@ class EventForm extends Component {
'hours'
)

if (moment(formApi.getValue('endDate')) > endBefore) {
if (moment(formApi.getValue('endDate')).isAfter(endBefore, 'minutes')) {
// console.log(moment(formApi.getValue('endDate')));
// console.log(endBefore);
return 'Max booking duration of ' + maxNoOfHours + ' hours.'
}
}
Expand Down