Hi,
I am using the Availability module in conjuction with CGCalendar which is great, but the client requires a select box drop down to jump to a particular month/year, instead of the standard 'prev' and 'next'.
I thought I had figured this out myself by using jQuery to refresh the page with variables added to the url, to set the variables in the section '...month=$month year=$year....' in the calendar template. This works, except for the fact that the number of days visible doesn't change according to the month - it stays the same as the current month. Is there an easier way I can achieve this?
The jQuery I am using is:
$(document).ready(function(){
$('#go').click(function(){
$selmonth = $('.#newmonth :selected').attr("value");
$selyear = $('.#newyear :selected').attr("value");
location.href = ("booking-and-prices?apart={/literal}{$smarty.get.apart}{literal}&newyear="+$selyear+"&newmonth="+$selmonth);
});
});
Thanks!
Selecting month/year in Availability module
-
- Forum Members
- Posts: 20
- Joined: Sat May 15, 2010 9:54 am
-
- Forum Members
- Posts: 20
- Joined: Sat May 15, 2010 9:54 am
Re: Selecting month/year in Availability module
Can anyone try and help me with this? It would be sooo appreciated!!!! You can view a test page here:
http://aonachmor.cahilldesigns.com/test
If you try and change the month/year with the drop-down select box the start date and number of days in the month stays the same, although the reservations change as they should. If I can achive this effect with Ajax rather than refreshing the page it would be a bonus, but I just have no idea how.
p.s. I know how long the page takes to load, it seems to be a server problem and trying to get it sorted
Thanks!!!!!
http://aonachmor.cahilldesigns.com/test
If you try and change the month/year with the drop-down select box the start date and number of days in the month stays the same, although the reservations change as they should. If I can achive this effect with Ajax rather than refreshing the page it would be a bonus, but I just have no idea how.
p.s. I know how long the page takes to load, it seems to be a server problem and trying to get it sorted

Thanks!!!!!