Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Javascript for calculating End Date

Avatar

Former Community Member
I have two date fields "Start_Date" and "End_Date". User selects the start date. Then the form takes that date and adds 365 days. puts the result in the "End_Date" field. I have attempted a couple of scripts and none have worked. So I attempted to first just get the selected date in the "Start_Date" field to show in the "End_Date" field. When I select a date like, "May 28,2008" the output reads "Object44194500". Using the following script in the "Start_date" field



----- form1.Order_Page.Product_Table.Row4.Subscription_Start::change: - (JavaScript, client) -------



xfa.resolveNode("form1.Order_Page.Product_Table.Row5.Subscription_End").rawValue = this;



What am I doing wrong. How do it get it show currently while at the same time adding 365 days. So if the user select May 28, 2008 the output in the "End_Date" field is May 27, 2009??? Thanks

- a frustrated new developer of LiveCycle Designer 8.0...
18 Replies