diff --git a/src/containers/ListingPage/ListingPage.css b/src/containers/ListingPage/ListingPage.css
index fa6e4aaa..3eea1da6 100644
--- a/src/containers/ListingPage/ListingPage.css
+++ b/src/containers/ListingPage/ListingPage.css
@@ -67,7 +67,11 @@
background-color: #eee;
}
-.openDatePickerForm {
+.bookingForm {
+ margin: 0 1rem;
+}
+
+.openBookingForm {
position: fixed;
bottom: 0;
left: 0;
diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js
index 9843212c..12494fbe 100644
--- a/src/containers/ListingPage/ListingPage.js
+++ b/src/containers/ListingPage/ListingPage.js
@@ -6,6 +6,7 @@ import config from '../../config';
import { types } from '../../util/sdkLoader';
import { convertMoneyToNumber } from '../../util/currency';
import { Button, Map, ModalInMobile, PageLayout } from '../../components';
+import { BookingDatesForm } from '../../containers';
import { getListingsById } from '../../ducks/sdk.duck';
import { showListing } from './ListingPage.duck';
import css from './ListingPage.css';
@@ -39,9 +40,22 @@ export class ListingPageComponent extends Component {
isBookingModalOpenOnMobile: tab && tab === 'book',
pageClassNames: '',
};
+
+ this.onSubmit = this.onSubmit.bind(this);
this.togglePageClassNames = this.togglePageClassNames.bind(this);
}
+ onSubmit(values) {
+ const { marketplaceData, params } = this.props;
+ const id = new UUID(params.id);
+ const listingsById = getListingsById(marketplaceData, [id]);
+ const currentListing = listingsById.length > 0 ? listingsById[0] : null;
+
+ this.setState({ isBookingModalOpenOnMobile: false });
+ // eslint-disable-next-line no-console
+ console.log('Submitting with bookedDates', values, ' and listing price', currentListing.attributes.price);
+ }
+
togglePageClassNames(className, addClass = true) {
this.setState(prevState => {
const prevPageClassNames = prevState.pageClassNames.split(' ');
@@ -116,10 +130,10 @@ export class ListingPageComponent extends Component {
title={bookBtnMessage}
togglePageClassNames={this.togglePageClassNames}
>
- ModalInMobile content
+