Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

How i can chage the date formatt using java script?

$
0
0

Hi All,

 

I have a data field. In Object -> Valid patterns I changed the format as MM/DD/YYYY.

 

and i am writing the java script code on exit event of date field

 

 

var

 

reGoodDate =/^(?:(0[1-9]|1[012])[\/.](0[1-9]|[12][0-9]|3[01])[\/.](19|20)[0-9]{2})$/

;

 

if (reGoodDate.test(dt))

{

xfa.host.messageBox("Correct format")

}

else

{

xfa.host.messageBox("Incorrect Format");

}

 

 

but though i am giving the correct date formatt it is giving  as error message


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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