diff --git a/edivorce/apps/core/static/js/ajax.js b/edivorce/apps/core/static/js/ajax.js
index 23684754..76c85786 100644
--- a/edivorce/apps/core/static/js/ajax.js
+++ b/edivorce/apps/core/static/js/ajax.js
@@ -7,9 +7,8 @@ var ajaxOnChange = function () {
var value = getValue(el, question);
var isValid = true;
- // todo: Can this be removed? the forceParse option in the datepicker seems to take care of date validation for us
// Check if date is in valid format DD/MM/YYYY
- if (el.is(".date-picker")){
+ if (el.is(".date-picker") || el.is(".date-pickers")){
isValid = validateDate(el);
}
diff --git a/edivorce/apps/core/static/js/controllers.js b/edivorce/apps/core/static/js/controllers.js
index 98a8f4ef..8eb7c11f 100644
--- a/edivorce/apps/core/static/js/controllers.js
+++ b/edivorce/apps/core/static/js/controllers.js
@@ -183,7 +183,7 @@ var validateEmail = function(el){
// check if value in date field is in DD/MM/YYYY format
// and check if it is valid date and it is today or earlier
var validateDate = function(el){
- el.closest('.date-picker-group')
+ el.closest('.date')
.removeClass('has-error')
.find('span.help-block')
.remove();
@@ -198,7 +198,7 @@ var validateDate = function(el){
return true;
}
- el.closest('.date-picker-group')
+ el.closest('.date')
.addClass('has-error')
.append('Invalid Date');
diff --git a/edivorce/apps/core/templates/partials/reconciliation_period.html b/edivorce/apps/core/templates/partials/reconciliation_period.html
index c8c74ff4..ec6ff791 100644
--- a/edivorce/apps/core/templates/partials/reconciliation_period.html
+++ b/edivorce/apps/core/templates/partials/reconciliation_period.html
@@ -13,5 +13,5 @@
{% input_field type="text" name="reconciliation_period" value=to multiple='true' class="date-pickers reconciliation-to-date form-control" placeholder="DD/MM/YYYY" %}
-
+
\ No newline at end of file