populate textfields by datefield

Avatar

Avatar
Validate 10
Level 2
eugzl
Level 2

Likes

5 likes

Total Posts

171 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 2
eugzl
Level 2

Likes

5 likes

Total Posts

171 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
eugzl
Level 2

06-03-2018

Hi All.

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.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

08-03-2018

it is possible to calculate date fields with JS however it is much more complex. Stick with FormCalc for ease of use.

Avatar

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
MinusZero
Level 4

07-03-2018

Hi,

I am note sure that Javascript handles date calculations

1436298_pastedImage_0.png

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.

Avatar

Avatar
Validate 10
Level 2
eugzl
Level 2

Likes

5 likes

Total Posts

171 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 2
eugzl
Level 2

Likes

5 likes

Total Posts

171 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
eugzl
Level 2

07-03-2018

Does possible to calculate date in javascript?

Thanks.

Avatar

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
MinusZero
Level 4

06-03-2018

Hi,

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[0].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.