Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Always show datepicker
- This topic has 3 replies, 3 voices, and was last updated 5 years, 9 months ago by Stacy Lind.
- AuthorPosts
- February 5, 2019 at 9:06 am #768818TonyParticipant
I want to make the datepicker calendar always be visible when using the [mphb_availability_search ] shortcode.
Instead of having to click the check-in and check-out fields to have the calendar pop-out, I want have the datepicker calendar to be pinned and always be visible under each field.Any ideas on how I can make it show this way?
February 6, 2019 at 3:38 pm #769473J. DavisKeymasterHello Tony,
Unfortunately there is no option to make date-pick popups active by default. Moreover if you make date-picker active for both fields with vertical alignment then one of them will overlap the other one.
Could you specify the reason why you need those fields to be active by default?
best regards,
J. DavisFebruary 7, 2019 at 2:39 pm #769918TonyParticipantThanks for the reply, even though I didn’t get the response I was hoping for.
The reason is that my client wants it shown that way, but if its not possible then we will have to make it work like it is.
February 8, 2019 at 2:13 pm #770263Stacy LindKeymasterHi Tony,
The calendars can be displayed at all times if you change the input field to a div. E.g. for forms added with [mphb_availability_search] edit \wp-content\plugins\motopress-hotel-booking\templates\shortcodes\search\search-form.php
Change lines 33-43:<input id="<?php echo esc_attr( 'mphb_check_in_date-' . $uniqid ); ?>" data-datepick-group="<?php echo esc_attr( $uniqid ); ?>" value="<?php echo esc_attr( $checkInDate ); ?>" placeholder="<?php _e( 'Check-in Date', 'motopress-hotel-booking' ); ?>" required="required" type="text" name="mphb_check_in_date" class="mphb-datepick" autocomplete="off" />
to a div:
<div id="<?php echo esc_attr( 'mphb_check_in_date-' . $uniqid ); ?>" data-datepick-group="<?php echo esc_attr( $uniqid ); ?>" value="<?php echo esc_attr( $checkInDate ); ?>" placeholder="<?php _e( 'Check-in Date', 'motopress-hotel-booking' ); ?>" required="required" type="text" name="mphb_check_in_date" class="mphb-datepick" autocomplete="off"> </div>
This will display the check-in date-picker instead of the input field. It may require additional styling, too.
- AuthorPosts
- You must be logged in to reply to this topic.