You can see this code in action by checking out this demo.
Another annoying task that has simplified is date validation.
Many thanks One possible way is:// custom validation script;if(event.value ! Thanks George - the validation script worked a charm...
except all my other calculations then stopped working.
But i could not modify to convert it to validate required format. I have the validation coding for mm-dd-yyyy format. Just reverse the arrangement of characters in your regular expression.
But i could not modify to convert it to validate required format. As it wont be enough make sure that the value you compare to the regular expression is in the format which you want.
Thus you’ll have to verify the month, year and day of a Date separately to detect an invalid date.
Hi I am creating a fillable timesheet for user to complete and then print.
Date format conversion with Moment is simple, as shown in the following example.is freely available for download from the project’s home page.can be run from the browser as well as from within a application.The end user puts in the week beginning date (Monday) and then all the days and corresponding dates are filled in - all good! I need a validation script that only lets them enter a date that is a Monday!!I currently have a validation running to check the date format is correct. You can also use the "util.priintd" method to get the 3 character week day of the week or the full day of the week;app.alert("Day of week: " util.printd("ddd", o Date)); // 3 character day;app.alert("Day of week: " util.printd("dddd", o Date)); // full character day; And change the logical test as necessary.
As it wont be enough make sure that the value you compare to the regular expression is in the format which you want.