View previous topic :: View next topic |
Author |
Message |
Cady36
Joined: 16 Dec 2005 Posts: 25
|
Posted: Fri Dec 16, 2005 6:07 pm Post subject: Limiting selections by duration and day-of-week. |
|
|
I'm working on a site for a travel company. They rent many properties, all by the week. Each property has a changeover day - the day of the week the week starts - which will vary according to the property. I plan to create an instance for each property based on it's changeover day, using a three month calendar similar to the Outlook Triplex.
Is there a way to limit selections to multiples of seven days?
Is there a way to ensure that the selection starts on a specific day of the week?
Thanks
Julie Siebel
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Sat Dec 17, 2005 5:32 am Post subject: |
|
|
Is there a way to limit selections to multiples of seven days?
No, currently there isn't.
Is there a way to ensure that the selection starts on a specific day of the week?
Yes, you may try prepend the following code to the fOnChange() function in plugins.js, e.g.
Code: | function fOnChange(y,m,d,e) {
var dt=new Date(y,m-1,d);
if (dt.getDay()!=0) {
alert("must select Sunday.");
return true; // return true will cancel the select intention
}
...
} |
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
Cady36
Joined: 16 Dec 2005 Posts: 25
|
Posted: Sat Dec 17, 2005 6:09 pm Post subject: |
|
|
You guys were so thorough in creating this (you did all the hard parts , that I'm sure I can create an extra function that will do what I need, so far as selecting in multiples weeks. When I come up with a way around it, I will post it here.
Thanks!
Julie
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Sat Dec 17, 2005 7:37 pm Post subject: |
|
|
You're welcome, Julie. And thanks in advance for sharing your valuable knowlege here.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
|