• Resolved canu

    (@canu)


    Hi,

    Is it possible to remove the Default Date in a Room Search as shown here?
    Please advise.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author benitolopez

    (@benitolopez)

    Hi,

    Sorry but I don’t understand. What default date? The datepicker at the top?
    https://lopezb.d.pr/brZRwO

    I don’t know if your theme is modifying the plugin’s templates (if yes, contact the developers) but you just need this code in functions.php of your theme (or child theme):

    remove_action( 'hotelier_room_list_datepicker', 'hotelier_template_datepicker', 10 );
    
    • This reply was modified 2 years, 7 months ago by benitolopez.
    Thread Starter canu

    (@canu)

    Hi Benito,

    Thanks for your response.

    Yes, I was referring to the date picker.
    My first enquiry was to theme support & they referred this to you.
    Is it possible for this date picker not to have any dates populating it, i.e. loads, the date picker does not have any dates (blank values) so forcing people to enter dates?

    Thanks,

    • This reply was modified 2 years, 7 months ago by canu.
    Plugin Author benitolopez

    (@benitolopez)

    No, it’s not possibile. It is populated automatically otherwise we don’t have a date to check. That page (the Listing page) shows the available rooms for certain dates. It is not an archive.

    I don’t know what you’re trying to achieve but removing the datepicker is not a good idea. Because even if you remove it it will still have an effect. Internally a date will be chosen for checkin and checkout in any case, to make a check of available rooms.

    And there will be days when you won’t find a room in that list because it’s occupied. I repeat, that page is not an archive, but a page that allows you to see which rooms are available on a particular date.

    Thread Starter canu

    (@canu)

    OK, thanks.
    So in that case, how are the dates determined?

    Thanks

    Plugin Author benitolopez

    (@benitolopez)

    If there are no checkin/checkout dates in session (ie. you didn’t submit the datepicker form yet):

    • For the checkin, it starts from today and then it checks if arrival must be “XX” days from current date.
    • Checkout is default checkin + minimum number of nights a guest can book.
    Thread Starter canu

    (@canu)

    Perfect, thanks for your help Benito.

    Thread Starter canu

    (@canu)

    Sorry Benito, just one more question/observation.
    I changed the checkin date from 0 days from the current date to 90 days.
    I expected the date in the datepicker (when I didn’t submit the form) to change from the current date to 90 days ahead of the current date.
    The minimum stay is 3 days so I also expected the checkout date to be 93 days ahead of the current date.

    Is that correct?

    When I clicked the datepicker, the calendars were 90 days ahead of the current date which is fine.

    Plugin Author benitolopez

    (@benitolopez)

    Yes it’s correct. But you need to open your website in a new incognito page to see it in action. You didn’t notice the change because the old session was stored in a cookie in your browser. After you submit the form, the checkin/checkout dates are stored in a session cookie. You need to clear your cookies (or open a new incognito window) to see the default dates.

    Thread Starter canu

    (@canu)

    Got it, thanks again for your help Benito!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Default Date on the Room List’ is closed to new replies.