on 10-01-2008 1:08 PM
hi,
I have a from date and to date fields on the adobe form.
And also I have a button on the form.
By default from date and to date is displayed.
Now My req is : whenever the user clicks the button ...the value which is displayed in from date field should be substracted by 7.
for ex : from date field has date sep 10.(by default).
when the user clicks the button ...
from date field should display sep3.(i.e. sep10 - 7 days = sep 3)
I dont know Java Script .
can anyone help?
Arjun,
I am not sure if your requirement is possible in JavaScript but can be achived in FormCalc and if you do below steps:-
1. Lets say you have From Date Field named Date1. In Object palette --> Select Field Tab --> Enter / select a value for Display Pattern --> I selected "MM/DD/YYYY" as the pattern.
2. In the click event of the button, select language as FormCalc and add following code:-
if (Date1.rawValue ne null) then
Date1.formattedValue = Num2Date(Date2Num(Date1.formattedValue, "MM/DD/YYYY") - 7, "MM/DD/YYYY")
else
null
endif
Note: If you select any other pattern for the Date1 field that make the changes in above code accordingly.
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In submit event of the button have you try this javascript code.
data......date_to.rawValue = data......date_to.rawValue - 7 .
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.