diff options
| author | len-odoo <len@odoo.com> | 2018-10-05 11:28:48 +0000 |
|---|---|---|
| committer | len-odoo <len@odoo.com> | 2018-10-05 11:28:50 +0000 |
| commit | a034a17d37b7018e48cd2dd5726b4c8c7cb41cee (patch) | |
| tree | df055cb08ae8c563d093c9ed1abd50fd7e4cc578 /addons/survey/static | |
| parent | a9ce28bfb1fe2bb3087d44e912ec2b39785ab76f (diff) | |
[FIX] survey: fix date picker template and validation
The date picker widget was set to text instead of date.
Then we needed to fix the date validation at form submit.
opw 1890130
closes odoo/odoo#27448
Diffstat (limited to 'addons/survey/static')
| -rw-r--r-- | addons/survey/static/src/js/survey.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/survey/static/src/js/survey.js b/addons/survey/static/src/js/survey.js index eb8f451aa39..145005790ec 100644 --- a/addons/survey/static/src/js/survey.js +++ b/addons/survey/static/src/js/survey.js @@ -134,7 +134,7 @@ if(!the_form.length) { var date_fields = $form.find('div.date > input.form-control'); for (var i=0; i < date_fields.length; i++) { var el = date_fields[i]; - var moment_date = $(el).data('DateTimePicker').date(); + var moment_date = moment(el.value); if (moment_date) { moment_date.toJSON = function () { return this.clone().locale('en').format('YYYY-MM-DD'); |
