4 Replies Latest reply on Sep 13, 2010 12:53 PM by Harris927

    Need script for leading zeros in date

    Harris927

      I'm very new to adobe scripting and Im needing a little help with some scripting for the date. I found something that would work if I needed the date to autopopulate every time but right now I'm fine with the user manually typing it in. But I would like the format to be MM/DD/YYYY and if they type in something like M/D/YYYY for it to automatically add the leading zeros to it when they tab out of the field. The problem is I have 3 different fields set up for the date. The first field is MM, second field is DD and third is YYYY. So I have to put in a script in the month and day field for it to add the leading zeros and nothing so far I've tried has worked. I'd rather it automatically change then have an error message go off if they enter the format wrong. Also, its a long explanation but I don't want one date field, I need it divided up like this. Does anyone know of a script that will work? Thanks so much for the help!