In my LiveCycle form 3 textfields and 1 datefield. I would like to populate textfields by value from datefield with display format "MM/DD". Each textfield will display date increased by 7 days. For instance, user will select date in datefield like 03/05/2018. In that case
textfield1 will display 03/12,
textfield2 will display 03/19,
textfield3 will display 03/26.
If that is possible. How do that? I will appreciate to detail explanation.
Date calculations have alway been a bit of a pain to me, fortunately i have never had to do it much.
So when i got it working, i noted it down. It isnt quite what you are after, but will give you a starting point.
I have two text fields, Start_Date and End_Date.
In the Start_Date exit event (FormCalc) i have this:
form1.#subform.Start_Date::exit - (FormCalc, client)
var current = Date2Num(Start_Date.rawValue, "MM/DD/YY")
var future = current + 90
var newDate = Num2Date(future,"MM/DD/YY")
End_Date.rawValue = newDate
What is does is upon exiting the Start_Date field, the End_Date field gets a value which is 90 days into the future. Perhaps you can modify it for your needs.
When i have had to mix and match code, i put the code in a hidden button to separate the code and programmatically click it.