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 

Limiting selections by duration and day-of-week.

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



Joined: 16 Dec 2005
Posts: 25

PostPosted: Fri Dec 16, 2005 6:07 pm    Post subject: Limiting selections by duration and day-of-week. Reply with quote

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


Joined: 30 Jan 2005
Posts: 409

PostPosted: Sat Dec 17, 2005 5:32 am    Post subject: Reply with quote

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



Joined: 16 Dec 2005
Posts: 25

PostPosted: Sat Dec 17, 2005 6:09 pm    Post subject: Reply with quote

You guys were so thorough in creating this (you did all the hard parts Smile, 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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Sat Dec 17, 2005 7:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP 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