[FIX] web: caret misplaced

Due to the library algorithm to place the datetimepicker,
the div containing the input was no longer relative so the caret was misplaced.
Put back the position relative and place the datetimepicker relative to the input.
This commit is contained in:
fwi-odoo
2017-02-14 15:10:01 +01:00
parent 7015ec5062
commit c93be09f2e
2 changed files with 4 additions and 2 deletions
@@ -46,8 +46,8 @@ var DateWidget = Widget.extend({
this.$input.focus(function(e) {
e.stopImmediatePropagation();
});
this.$el.datetimepicker(this.options);
this.picker = this.$el.data('DateTimePicker');
this.$input.datetimepicker(this.options);
this.picker = this.$input.data('DateTimePicker');
this.$input.click(this.picker.toggle.bind(this.picker));
this.set_readonly(false);
this.set_value(false);
@@ -13,6 +13,8 @@
}
.o_datepicker {
position: relative;
.o_datepicker_input {
width: 100%;
}