CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

set up calendar to select month and year

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> PopCalendarXP Related
View previous topic :: View next topic  
Author Message
Cathiec



Joined: 21 Feb 2006
Posts: 3

PostPosted: Tue Feb 21, 2006 3:52 pm    Post subject: set up calendar to select month and year Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Tue Feb 21, 2006 6:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cathiec



Joined: 21 Feb 2006
Posts: 3

PostPosted: Wed Feb 22, 2006 9:37 am    Post subject: Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Thu Feb 23, 2006 3:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Cathiec



Joined: 21 Feb 2006
Posts: 3

PostPosted: Thu Feb 23, 2006 9:22 am    Post subject: Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Thu Feb 23, 2006 3:06 pm    Post subject: Reply with quote

No, it won't. It's backward compatible.
_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> PopCalendarXP Related All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group