Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tweaking Pop up Calendar...

Status
Not open for further replies.

Sheltered

Programmer
Nov 26, 2002
55
0
0
GB
Hi, i'm wanting to use this pop up calendar found at . It's perfect for what i need in all ways except that i need to be able to go back 12 months instead of forward 12 months on the calendar.
I was wondering if anyone was able to tweak the code to change this?
I would be forever gratefull :)

Pete
 
Think i have managed to find the piece of code that creates the dropdown list with months on...
Code:
function setSelectList(year,month) {
 var i = 0;
 var obj = null;
 if (ppcIE) {obj = document.ppcMonthList.sItem;}
 else if (ppcNN) {obj = document.layers['PopUpCalendar'].document.layers['monthSelector'].document.ppcMonthList.sItem;}
 else {/* NOP */}
 while (i < 13) {
  obj.options[i].value = year + "|" + month;
  obj.options[i].text  = year + " • " + ppcMN[month];
  i++;
  month++;
  if (month == 12) {year++;month = 0;}}}
I have tried i=-12 and while (i<0) but that dont wont.
I need helllppp! ;-)
 
try changing month++; to month--;

Known is handfull, Unknown is worldfull
 
Thanks Jeff, that'll do nicely. A very nice calendar indeed! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top