summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2017-05-15 15:07:10 +0200
committerChristophe Matthieu <chm@odoo.com>2017-05-15 16:19:37 +0200
commit932e8874004da7b0222cd1846eac090819d3ab07 (patch)
tree23e3e44932580e9bfcd97706994ed86a3b62acf5 /addons/web/static/src
parent2e6a1623ff6317191cd74488a66ba0cfc339d327 (diff)
[FIX] web: datepicker did not select correct date after initial render
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/widgets/date_picker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/widgets/date_picker.js b/addons/web/static/src/js/widgets/date_picker.js
index 1aaf05ee11e..06dccc85d4a 100644
--- a/addons/web/static/src/js/widgets/date_picker.js
+++ b/addons/web/static/src/js/widgets/date_picker.js
@@ -56,7 +56,7 @@ var DateWidget = Widget.extend({
var formatted_value = value ? this.format_client(value) : null;
this.$input.val(formatted_value);
if (this.picker) {
- this.picker.date(formatted_value);
+ this.picker.date(value || null);
}
},
get_value: function() {
@@ -95,7 +95,7 @@ var DateWidget = Widget.extend({
//the input field if any or the current day otherwise
var value = moment().second(0);
if(this.$input.val().length !== 0 && this.is_valid()) {
- value = this.$input.val();
+ value = this.parse_client(this.$input.val());
}
this.picker.date(value);