|
|
@ -25,7 +25,8 @@ odoo.define('web_widget_timepicker', function (require) { |
|
|
|
|
|
|
|
setValue: function (value) { |
|
|
|
this.set({'value': value}); |
|
|
|
var formatted_value = value ? this._formatClient(value) : null; |
|
|
|
var formatted_value = _.isNumber(value) |
|
|
|
? this._formatClient(value) : null; |
|
|
|
this.$input.val(formatted_value); |
|
|
|
if (this.picker) { |
|
|
|
var fdate = new moment(formatted_value, this.options.format); |
|
|
@ -36,7 +37,7 @@ odoo.define('web_widget_timepicker', function (require) { |
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
var value = this.get('value'); |
|
|
|
return value ? this._formatClient(value) : null; |
|
|
|
return _.isNumber(value) ? this._formatClient(value) : null; |
|
|
|
}, |
|
|
|
|
|
|
|
changeDatetime: function () { |
|
|
|