on 12-05-2008 9:40 AM
Hi
i have binded an atrribute of type date to date/time field (DD-MMM-YYYY) .if user enters any other formats like 1234,or an invalid date,then he click on submit button, error msg is displaying saying that "Enter the value in the format 1987- 11-25." instead of 25-NOV-1987 .please can u send the date validation code .
Thanks
kishore
Edited by: kishore shikore on Dec 5, 2008 10:40 AM
Edited by: kishore shikore on Dec 5, 2008 10:41 AM
Edited by: kishore shikore on Dec 5, 2008 10:42 AM
Edited by: kishore shikore on Dec 5, 2008 10:42 AM
thanx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thats right Chintan.
Here, by specified date I meant the format you want the date. i.e: DD-MM-YYYY or MM-DD-YYYY etc.
It's just an example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore -
I just gave a sample script.
if (data.subform1.DATE.format != 'specified format')
then
xfa.host.messageBox("Please enter DATE in YYYY-MM-DD format only")
endif
You should write your subform etc where you have declared DATE field. Similarly, you should also specify your desired format.
I hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi -
Try this. May be it would help.
You can write formcalc script on DATE field in 'preSubmit' event to validate the specified format and a message to pop up.
FormCalc script -
if (data.subform1.DATE.format != 'specified format')
then
xfa.host.messageBox("Please enter DATE in YYYY-MM-DD format only")
endif
As you have already specified the DATE format in paletts -> objects -> bindings, it will not accept any other format entered. The above script will let a message to pop up displaying the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.