[FIX] web_tour: listen on date range picker event

When applying the selected date range using the widget the
tip wasn't consumed. This commit fixes it by listening on the
event triggered when clicking on button apply.

closes odoo/odoo#45916

X-original-commit: 150d69f70a505efa298c66119eced29d8caa3699
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Michael Mattiello (mcm)
2020-02-21 11:21:03 +00:00
parent cfabde8386
commit 3ecea2c934
+4
View File
@@ -312,6 +312,10 @@ Tip.getConsumeEventType = function ($element) {
var type = $(this).attr("type");
return !type || !!type.match(/^(email|number|password|search|tel|text|url)$/);
})) {
// FieldDateRange triggers a special event when using the widget
if ($element.hasClass("o_field_date_range")) {
return "apply.daterangepicker input";
}
return "input";
} else if ($element.hasClass('ui-draggable-handle')) {
return "drag";