Commit 41b054f6 by muzaffaryousaf

Adding more readable comments to catch block.

TNL-58
parent c6816920
...@@ -237,7 +237,8 @@ OpenAssessment.DatetimeControl.prototype = { ...@@ -237,7 +237,8 @@ OpenAssessment.DatetimeControl.prototype = {
var parsedDate = $.datepicker.parseDate($.datepicker.ISO_8601, dateString); var parsedDate = $.datepicker.parseDate($.datepicker.ISO_8601, dateString);
isDateValid = parsedDate instanceof Date; isDateValid = parsedDate instanceof Date;
} catch (err) { } catch (err) {
// parseDate throws error if date is not in expected format. // parseDate function throws error if date is not in expected format.
// isDateValid flag would remain false.
} }
if (!isDateValid) { if (!isDateValid) {
$(this.datePicker, this.element).addClass("openassessment_highlighted_field"); $(this.datePicker, this.element).addClass("openassessment_highlighted_field");
......
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