View previous topic :: View next topic |
Author |
Message |
tonydeleon
Joined: 18 Dec 2008 Posts: 9
|
Posted: Mon Jan 12, 2009 4:12 pm Post subject: End Date begining one more day of the selected day on the Start Date |
|
|
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 |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Mon Jan 12, 2009 5:05 pm Post subject: |
|
|
We'll investigate further on this topic, will let you know soon.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Mon Jan 12, 2009 5:51 pm Post subject: |
|
|
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 |
|
|
tonydeleon
Joined: 18 Dec 2008 Posts: 9
|
Posted: Mon Jan 12, 2009 6:10 pm Post subject: Error in the browser |
|
|
I used your code but it appears an error in my browser
"_endc is undefined"
best regards
Tony
|
|
Back to top |
|
|
tonydeleon
Joined: 18 Dec 2008 Posts: 9
|
Posted: Mon Jan 12, 2009 6:20 pm Post subject: Now is wonking ! |
|
|
iT'S WORKING THANK YOU VERY MUCH
|
|
Back to top |
|
|
|