calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Feb 15, 2005 7:05 pm Post subject: How to prevent the calendar from being switched to prev/next months when a day of them is selected? |
|
|
You need to put 4 lines of code into the fOnChange() plugin function. e.g.
Code: | function fOnChange(y,m,d,e) {
...
if (m!=gCurMonth[1]&&[y,m,d]+''!=gToday+'') { // cancel the auto month switching
fRepaint();
return true;
}
return false; // return true to cancel the change.
} |
So afterwards, clicking the dimmed days that belongs to prev/next months will no longer automatically switch the calendar.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|