Handling "Past dates" different

Help with installation and general calendar setttings

Handling "Past dates" different

Postby olliu » Fri Jul 16, 2010 10:22 am

Hello,
In your Calender App you have the option to make past dates active or passive.

Is it possible to disable the go back prev button to past dates ?

For example: If I have 6 months to show, the first is july, now we have e.g. august, july can be shown but I can't go back to the last 6 months like june. Would be important to not show the efficiency over the last years for everyone on the website.

A workarround would be if it could be possible to automatically delete the bookings for the past dates. So you can go back but no bookings which where made are shown. Can be deleted or invisible.

Thx.
olliu
 
Posts: 5
Joined: Mon Jul 12, 2010 5:05 pm

Re: Handling "Past dates" different

Postby chris » Fri Jul 16, 2010 11:35 am

Hi,
Have you seen this post?
I think that it pretty much does what you are asking. Let me know if that isn't what you where after.
A workarround would be if it could be possible to automatically delete the bookings for the past dates. So you can go back but no bookings which where made are shown. Can be deleted or invisible.

I don't think that this would be a good idea. It is always good to keep an historical of the bookings.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Handling "Past dates" different

Postby olliu » Fri Jul 16, 2010 11:53 am

Haven't seen that post but this doesn't work. After I changed the code the prev button disappears after loading (while loading it is visible). Then if it finishes, you can't click forward.

Edit: Took out the experimental links
Last edited by olliu on Fri Jul 16, 2010 1:13 pm, edited 1 time in total.
olliu
 
Posts: 5
Joined: Mon Jul 12, 2010 5:05 pm

Re: Handling "Past dates" different

Postby chris » Fri Jul 16, 2010 12:11 pm

hmm, somewhow a JavaScript error has slipped throough my tests :(


In that modified JavaScript code, find the line:
Code: Select all
function calendar_nav(){

and add this directly after it:
Code: Select all
   var d = new Date();

so you will have this:
Code: Select all
function calendar_nav(){
   var d = new Date();


That should fix the "next" button problem.

Chris

PS. I have now corrected the code in that other post with this fix.
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Handling "Past dates" different

Postby olliu » Fri Jul 16, 2010 1:07 pm

Great thx now it works.

What's a bit odd is that first you see the two buttons while loading and then it disappears. For users who see that it seems to be broken.

Is it possible to check that bevor the images are drawn ?
olliu
 
Posts: 5
Joined: Mon Jul 12, 2010 5:05 pm

Re: Handling "Past dates" different

Postby chris » Fri Jul 16, 2010 1:34 pm

You could try hiding them with the css and then displaying it with the js code.
Alternatively you could create the buttons via JavaScript once the page has loaded.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron