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 

End Date begining one more day of the selected day on the Start Date

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



Joined: 18 Dec 2008
Posts: 9

PostPosted: Mon Jan 12, 2009 4:12 pm    Post subject: End Date begining one more day of the selected day on the Start Date Reply with quote

I'm using OutlookTwin in PopCalendar.
Since our company is a Travel Agency and we sell rooms per nights, we need to avoid that our users can select the same day in check-in and check out of the hotels.

I'd like this:
If a user select 01/15/2009 in the Start Date the End Date start from 01/16/2009 and not 01/15/2009 again.

Best regards
Tony
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Mon Jan 12, 2009 5:05 pm    Post subject: Reply with quote

We'll investigate further on this topic, will let you know soon.
_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Mon Jan 12, 2009 5:51 pm    Post subject: Reply with quote

Please use the following code to replace your fEndPop() in plugins.js:
Code:
function fEndPop(startc,endc) {
  _startc=startc;
  _endc=endc;

  var sd=fParseInput(startc.value);
  if (!sd) sd=gBegin;

  if (!_endc.value&&sd[2]==fGetDays(sd[0])[sd[1]])
  {
    // sd is the last day of a month, preselect the 1st day of next month
    var ndt = sd.slice(0);
    ndt[2]=1;
    ndt[1]++;
    if (ndt[1]>12) {ndt[0]++; ndt[1]=1;}
 
    _endc.value = fFormatDate(ndt[0],ndt[1],ndt[2]);
  }

  fPopMulti(endc, [sd,gEnd,sd]);
}

_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
tonydeleon



Joined: 18 Dec 2008
Posts: 9

PostPosted: Mon Jan 12, 2009 6:10 pm    Post subject: Error in the browser Reply with quote

I used your code but it appears an error in my browser

"_endc is undefined"

best regards
Tony
Back to top
View user's profile Send private message
tonydeleon



Joined: 18 Dec 2008
Posts: 9

PostPosted: Mon Jan 12, 2009 6:20 pm    Post subject: Now is wonking ! Reply with quote

iT'S WORKING THANK YOU VERY MUCH
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