Today available hours not in sync with Google Calendar until selection

51 views
Skip to first unread message

Mathias Krenek

unread,
Oct 29, 2015, 1:12:51 PM10/29/15
to Easy!Appointments - Support Group
Hi,

the available hours displayed by default on step 2 for today isn't synchronized with Google calendar until you select the today's date in the date picker again.


I suppose nobody would click on today's date when it's already selected by default.

I'm sure there would be an easy fix in frontend_book.js. I tried some modifications but it seems that I'm not good enough in Javascript to find the solution myself for the moment. ;-)


I would appreciate your help.

Thanks in advance.

By the way, a big thank to Alex for this great software and to all the contributors.


I'm using E!A version 1.1 modified by Craig Tucker.

Mathias Krenek

unread,
Oct 30, 2015, 10:32:52 AM10/30/15
to Easy!Appointments - Support Group
Ok, I found a trick with the "Next" button.

In the first step, after selecting the service, with or without provider change, when you click Next, the program updates the available hours again.

I added theses lines in  /assets/js/frontend_book.js  in the "Next Step Button "Clicked" section :

        $('.button-next').click(function() {
            //If we are on the 1st tab then update today's available hours
   if ($(this).attr('data-step_index') === '1') {
            FrontendBook.getAvailableHours(Date.today().toString('dd-MM-yyyy'));   
            }

In case it could help someone.

Craig Tucker

unread,
Oct 30, 2015, 11:40:34 AM10/30/15
to Easy!Appointments - Support Group
Thanks Mathias.  I am adding this to the code and updating it on my post for my 1.1 build.
Reply all
Reply to author
Forward
0 new messages