Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Validating a date by using a script

Avatar

Level 3

Dear All.

I'd like to validate a date format as "YYYY년 MM월 DD일", Korea standard time, already tried as bellow code, but YYYY. MM. DD format is also allowed.

how to filter date format as i mentioned.

Thanks.

------------------------------------------------------------code------------------------------------------------------------

var sDate = this.rawValue;

var oDate = util.scand("yyyy-mm-dd", sDate);

app.alert(oDate);
if(oDate == null){
  xfa.host.messageBox("Pleae enter a valid date.");
exit;
}

0 Replies