Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Fill 2 Dates with one popup
moonchilddave
Junior Member

Posts: 4
Registered: 10/30/2007
Location: Leonardtown, MD
Member Is Offline
posted on 10/30/2007 at 04:54 PM Reply With Quote
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?
View User's Profile View All Posts By User U2U Member
moonchilddave
Junior Member

Posts: 4
Registered: 10/30/2007
Location: Leonardtown, MD
Member Is Offline
posted on 10/30/2007 at 06:00 PM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
moonchilddave
Junior Member

Posts: 4
Registered: 10/30/2007
Location: Leonardtown, MD
Member Is Offline
posted on 10/30/2007 at 07:14 PM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004