View previous topic :: View next topic |
Author |
Message |
Cathiec
Joined: 21 Feb 2006 Posts: 3
|
Posted: Tue Feb 21, 2006 3:52 pm Post subject: set up calendar to select month and year |
|
|
hi there,
can you tell me how to set up the calendar so that only month and year can be selected and not the day. i have other controls on the same page where the day month and year must be selected.
thanks and regards,
cathie
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Feb 21, 2006 6:10 pm Post subject: |
|
|
Sorry, but I'm a bit confused - do you still want the calendar panel showing up with days? And when user clicks on any date in that month, only the value of year and month are formatted in the <input> field?
Or maybe just 2 HTML dropdowns with years and months?
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
Cathiec
Joined: 21 Feb 2006 Posts: 3
|
Posted: Wed Feb 22, 2006 9:37 am Post subject: |
|
|
no i dont want the days to show - when the button is clicked then the user should just be able to select the month and the year.
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Thu Feb 23, 2006 3:58 am Post subject: |
|
|
Please download version 9.7.288 and then use the following code in the plugins.js of the normal theme:
Code: | gbHideCalMiddle=true;
gbHideBottom=true;
function fOnChange(y,m,d,e) {
gdCtrl.value=fFormatInput(y,m,d);
}
function fParseInput(str) {
var dt=str.split("-");
if (dt.length!=2) dt=gCurMonth;
return [dt[0],dt[1],0];
}
function fFormatInput(y,m,d) {
return y+"-"+m;
} |
Note that themes with non-native dropdowns are not suitable for this solution because only native html dropdowns are supported in such case.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
Cathiec
Joined: 21 Feb 2006 Posts: 3
|
Posted: Thu Feb 23, 2006 9:22 am Post subject: |
|
|
thanks for your prompt reply....will this version affect any other versions of calendar p that i am running on my machine or in appplications that i have deployed previously?
thanks and regards,
cathie
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Thu Feb 23, 2006 3:06 pm Post subject: |
|
|
No, it won't. It's backward compatible.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
|