Commit 136e68f9 by muzaffaryousaf

Using ISO_8601 for date formatting instead of string.

TNL-58
parent de130839
...@@ -235,10 +235,8 @@ OpenAssessment.DatetimeControl.prototype = { ...@@ -235,10 +235,8 @@ OpenAssessment.DatetimeControl.prototype = {
//try: to catch the error thrown by parseDate if date is not in expected format. //try: to catch the error thrown by parseDate if date is not in expected format.
try { try {
var parsedDate = $.datepicker.parseDate("yy-mm-dd", dateString); var parsedDate = $.datepicker.parseDate($.datepicker.ISO_8601, dateString);
if (parsedDate instanceof Date) { isDateValid = parsedDate instanceof Date;
isDateValid = true;
}
} }
catch (err) { catch (err) {
// do nothing. // do nothing.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment