Booking Form Shortcodes [Default Date]

Hello,

I see there is a way to default the service, provider and and category 

Is there a way to default to date too? Currently it automatically shows current date (nearest) but I would want this instead to show a from date of my picking - For example if a user selects they want to see an event on x Date, I want to store this as a cookie and then use this value as the default date in Bookly when loading the booking form, is there any sort of hook I can use, cookie I can override or any other such way I can do this - I am happy to programmatically do this if you give me some guidance on where to look for the default value.

Thanks

0

Comments

3 comments
Date Votes
  • Could I utilise something like this

    $("#yourinput").datepicker( "setDate" , " );

    Bookly uses jquery datepicker right?

    0
  • Not one to be beaten after about 10 hours I managed to crack it:

    Update UserBookingData.php

    From:

        public function getDateFrom()
        {
            return $this->date_from;
        }

    To:

            public function getDateFrom()
        {
            return $_COOKIE['event_date'];
        }

    I can now skip the services screen and pull the date from a cookie that I have stored based on user input on the homepage.

    Hope this helps someone else.

    0
  • If you use this method just remember when you update the bookly core you have to reapply this fix as it will be overridden!

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post