Quantcast
Channel: Adobe Community : Discussion List - LiveCycle Forms
Viewing all articles
Browse latest Browse all 1160

Format given date from Date Picker to convert into quarter and year

$
0
0

Still getting used to Livecycle and not attempting to make a effort at learning Javascript at the same time. I'm was attempting to work on a form in ES4 that would use the following formula to convert a date that someone selects from a date picker to then convert that date to show MM/YYYY in a new field. I would appreciate it if anyone has a couple of seconds to take a look at this and tell me what I'm missing to make this work.

 

 

Corey

 

form1.#subform[0].DateField2::calculate - (JavaScript, client)

DateField1.rawValue

 

form1.#subform[0].DateField3::calculate - (JavaScript, client)

var date = new Date(DateField1.rawValue);

var month = date.getMonth()+1;

var year = date.getFullYear();

if (DateField1.rawValue == null)

  {this.rawValue="";}

else

{

if (month<=03)  month="03";

if (month<=06)  month="06";

if (month<=09)  month="09";

if (month<=12)  month="12";

this.rawValue = month+"/"+date.getFullYear();

}


Viewing all articles
Browse latest Browse all 1160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>