View previous topic :: View next topic |
Author |
Message |
vipinc
Joined: 30 May 2008 Posts: 8
|
Posted: Fri May 30, 2008 5:07 pm Post subject: Multiple calendars and color change when 2 dates are clicked. |
|
|
Hi,
I have got 2 calendars in one form. What I need is , when I click 2 dates , the dates between them should change color so as to represent "Selected From date1 to Date2". How do I do this?
Also this needs to work when I click Date1 in the first calendar and Date2 in the second.
Thanks in advance.
regards,
Vipin
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Fri May 30, 2008 10:46 pm Post subject: |
|
|
This needs some configuration and coding. I'd suggest you take a look at the MultiPickerDemo2 (in the original package you received), and see if it meets your requirement.
In the meanwhile, we'll forward this to our development team and see if we can build a demo for you.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
vipinc
Joined: 30 May 2008 Posts: 8
|
Posted: Sun Jun 01, 2008 2:58 pm Post subject: |
|
|
Hi,
Infact I have already had a look at the multipicker2 demo.. But in it, you need to use CTRL+click to acheive wht I wanted. Is there any way I can avoid the CTRl key?
Appreciate all help. Do let me know incase you want to take a look at my code or if you have any suggestions
regards,
Vipin
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Sun Jun 01, 2008 5:42 pm Post subject: |
|
|
That's easy. You just need 2 modifications to the plugins2.js file on the MultiPikcerDemo2:
1. find the following line in the fOnDrag() function, about line 44:
Code: | fRemoveRange(y,m,d,bRangeClick||(e?e.button==2||e.which==3:false)); |
and replace it with
Code: | fRemoveRange(y,m,d,true); | This will deselect the whole range if you click a seletected date.
2. find the fCheckKeyPressed() function around line 206 and replace it totally with the following one:
Code: | function fCheckKeyPressed(key,e) {
if (!gContainer._gclicks) gContainer._gclicks=0;
return gContainer._gclicks++%2==0?false:true;
}
| This will, instead of checking for key pressed, make the 1st click to be the start of range and the 2nd click to be the end of range.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
vipinc
Joined: 30 May 2008 Posts: 8
|
Posted: Sun Jun 08, 2008 4:49 pm Post subject: |
|
|
Thanks .. That worked !!
But a new problem has risen. When the user does a 3rd click or a fourth, among the dates clicked, I want the lowest date to be the start date and the farthest date to be the end date and have the dates between these highlighted.
Did try a few things , but has not worked.
Can u help me with this?
Thanks.
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Mon Jun 09, 2008 4:16 am Post subject: |
|
|
We've just updated the RangePickerDemo in the latest version, which works exactly as you required. Please go ahead and download the new version and try.
http://www.calendarxp.net/forum/viewtopic.php?p=705
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
vipinc
Joined: 30 May 2008 Posts: 8
|
Posted: Tue Jun 10, 2008 6:09 am Post subject: |
|
|
The 3rd click is still the problem.. The 3rd click is taken as the Start Date
regards.
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Jun 10, 2008 6:35 pm Post subject: |
|
|
It's designed to be that way - if always using the lowest/furtherest date, then the user will never be able to shrink the range.
Also the logic is defined in the fAddRange() function of the plugins.js, you may easily modify it to suit your own taste.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
vipinc
Joined: 30 May 2008 Posts: 8
|
Posted: Mon Jun 16, 2008 5:13 pm Post subject: |
|
|
Hi,
Which are the situations in which the selection goes out of range and it becomes impossible to do any further selection ?
I am using the Range Picker plugin
Thanks
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Mon Jun 16, 2008 8:44 pm Post subject: |
|
|
I guess you meant which condition parameters to control the boundaries of the range - if so, please take a look at the gBegin and gEnd options in the THEME_NAME.js file (in your case it's the xp.js).
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
vipinc
Joined: 30 May 2008 Posts: 8
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Jun 17, 2008 6:17 pm Post subject: |
|
|
It's because you are not using a valid license file for your test site.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
vipinc
Joined: 30 May 2008 Posts: 8
|
Posted: Wed Jun 18, 2008 4:45 am Post subject: |
|
|
ah.. the license is valid for the domain not the ip.
thanks.. sry for the trouble
|
|
Back to top |
|
|
|