Drop Down Menu Month Select

Help with installation and general calendar setttings

Drop Down Menu Month Select

Postby taffu » Sat May 21, 2011 12:51 pm


I love this AJAX calendar and I find that it is extremely easy to use and well designed.

I have read the post Drop Down Menu Year Select its excellent.

My question is, how do I go about creating a DROP DOWN MENU to select the Month I want to display?

I would like to put this menu next to the Lang. selection, but I am not sure how to do that in AJAX.

Posts: 4
Joined: Sat May 21, 2011 12:42 pm

Re: Drop Down Menu Month Select

Postby nightwalk » Wed Jun 20, 2012 6:59 pm

First off, great calendar.
I am interested in the drop down moth select as well.
Any ideas?
I added this in index.php

Code: Select all
<select id="jump_month">
             <option value="1">Jan</option>
             <option value="2">Feb</option>
             <option value="3">Mar</option>
             <option value="4">Apr</option>
             <option value="5">May</option>
             <option value="6">Jun</option>
             <option value="7">Jul</option>
             <option value="8">Aug</option>
             <option value="9">Sep</option>
             <option value="10">Oct</option>
             <option value="11">Nov</option>
             <option value="12">Dec</option>

I have this in the motools-cal-public.js file but it does not seem to work properly:

Code: Select all
        var  new_month=parseFloat(this.value);
        //   get each calendar and calculate new date
           var this_date=el.getFirst().id;
            var data=this_date.split('_');     
            //   convert to numeric
            //new_month   = parseFloat(this.value);
            cur_month   = parseFloat(data[0]);
            anew_year   = parseFloat(data[1]);
               //   reset month and add 1 year
               //   reset month and add 1 year

every time I select a month from the drop down list it loads a calendar with the wrong months. not sure how to fix it, not a JS guru.
If there is only one month selected for displaying in the calendar, teh code is simple enough, but for more than one month, I tried the code above, along with variations of it, and the calendar is loading the wrong months, almost like the passed value for the month is not correct.
Thank you.
Posts: 1
Joined: Wed Jun 20, 2012 6:53 pm

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest