


Hello Forum,
Does anyone have a script that could calculate the number of days between two dates?
I needed the number of days to auto generate after 2 dates are selected:
example for my form:
Start Date 11/1/09
End Date 11/11/09
(TextField) shows "10"
Thank You,
Arnold
Views
Replies
Sign in to like this content
Total Likes
here you go ....
Paul
Views
Replies
Sign in to like this content
Total Likes
Hi Paul,
Is there some script that I can add to the
TextField1 Box? Without the use of a button?
Arnold
Views
Replies
Sign in to like this content
Total Likes
Sure .....script is associated with an event that happens (the user enters, the field, the user changes data, the user exits the field .....). The question becomes when do you want to trigger the code. Typically it is on the exit event of the field (that signifies that the user is done with the field). In this case you woudl have to validate that the other date field was filled out before you even try to do the comparison.
Paul
Views
Replies
Sign in to like this content
Total Likes
So for instance if both date fields are filled the text field will calculate the days.
What script should I use for the TextField1 and where will it be set(change,exit,click,mouseup,mousedown)
I'm not sure how to finish it.
Arnols
Views
Replies
Sign in to like this content
Total Likes
I woudl put it on th eexit event of the second date field.
Paul
Views
Replies
Sign in to like this content
Total Likes
Could you provide the script for line?
It would help
Thank You,
Arnold
Views
Replies
Sign in to like this content
Total Likes
Just copy and paste the code form the button click event to the exit event of field 2.
Paul