If you want to restrict custom date entry you could use a regular expression such as
// form1.page1.subform1.dob::exit - (JavaScript, client)
var regExp = /^\d{1,2}\-\d{1,2}\-\d{4}$/
var str = this.rawValue;
if (!(regExp.test(str))) {
xfa.host.messageBox("The date of birth must be in the format MM-DD-YYYY, M-DD-YYYY or MM-D-YYYY.");
}
Steve