Expand my Community achievements bar.

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