moonchilddave
Junior Member
Posts: 4
Registered: 10/30/2007
Location: Leonardtown, MD
Member Is Offline
|
| posted on 10/30/2007 at 04:54 PM |
|
|
Fill 2 Dates with one popup
I'm using Tigra Calendar 3.0 and I have the following situation:
My form has 2 dates, a start date and end date - both with calendars and this works. What I'd like to do is if the end date is blank, populate it
with the value from the start date when it gets filled in. And then use the second calendar instance to modify this if needed.
Is this even possible?
|
|
|
moonchilddave
Junior Member
Posts: 4
Registered: 10/30/2007
Location: Leonardtown, MD
Member Is Offline
|
| posted on 10/30/2007 at 06:00 PM |
|
|
Actually, what would be ideal is rather than populating the end date with the value picked in the start date would be to have the calendar for the end
date START with the value from the start date.
|
|
|
moonchilddave
Junior Member
Posts: 4
Registered: 10/30/2007
Location: Leonardtown, MD
Member Is Offline
|
| posted on 10/30/2007 at 07:14 PM |
|
|
What I have in mind would be something like:
| Code: |
var cal2 = new calendar1(document.forms['reservation'].elements['date_end'],document.forms['reservation'].elements['date_start']);
|
With the first parameter being the "target" and the second parameter being optional (but if supplied points to where to set the start date of the
calendar, ie: the source). But, I would only want the source used IF the target value was empty.
So, for the example above, it would set the calendar start date to the value of "date_start" if the target "date_end" was not filled in, otherwise
the calendar would start with whatever was filled in as "date_end". And whatever was selected would populate "date_end" on the form when clicked.
I imagine for this to happen something has to be modified - but not really knowing Javascript all that well, I could really use some help.
|
|
|