From 6e28730881f8e321ce547bc1d396cc53073ff998 Mon Sep 17 00:00:00 2001 From: Mike Olund Date: Wed, 8 Mar 2017 06:11:24 -0800 Subject: [PATCH] DIV-191 - fixed datepicker issue with manual entry --- edivorce/apps/core/static/js/ajax.js | 7 ++++--- edivorce/apps/core/static/js/main.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/edivorce/apps/core/static/js/ajax.js b/edivorce/apps/core/static/js/ajax.js index ba49979d..59840b45 100644 --- a/edivorce/apps/core/static/js/ajax.js +++ b/edivorce/apps/core/static/js/ajax.js @@ -7,10 +7,11 @@ 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")){ - isValid = validateDate(value); - } + //if (el.is(".date-picker")){ + // isValid = validateDate(value); + //} if (el.is("#email_textbox")){ isValid = validateEmail(value); diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index 70b604f8..6fbfce20 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -109,7 +109,7 @@ var deleteAddedField = function(e){ // Configuration for datepicker var date_picker = function () { - $(".date-picker-group").datepicker({ + $(".date-picker-group input").datepicker({ format: "dd/mm/yyyy", startDate: "-100y", endDate: "0d",