From 4641bebc94e49c117919ecd0e34c9be97228234d Mon Sep 17 00:00:00 2001 From: Joris Vandermeersch Date: Fri, 31 Mar 2017 18:05:32 +0200 Subject: [PATCH] Fix #3063 - create id on datepicker fields, use it to set value --- .../filter-control/bootstrap-table-filter-control.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/filter-control/bootstrap-table-filter-control.js b/src/extensions/filter-control/bootstrap-table-filter-control.js index 3dae40b64d..6c2ab57f1c 100644 --- a/src/extensions/filter-control/bootstrap-table-filter-control.js +++ b/src/extensions/filter-control/bootstrap-table-filter-control.js @@ -257,7 +257,7 @@ if (column.searchable && that.options.filterTemplate[nameControl]) { addedFilterControl = true; isVisible = 'visible'; - html.push(that.options.filterTemplate[nameControl](that, column.field, isVisible, column.filterControlPlaceholder ? column.filterControlPlaceholder : "")); + html.push(that.options.filterTemplate[nameControl](that, column.field, isVisible, column.filterControlPlaceholder ? column.filterControlPlaceholder : "", "filter-control-" + i)); } } @@ -355,7 +355,7 @@ if (column.filterControl !== undefined && column.filterControl.toLowerCase() === 'datepicker') { header.find('.date-filter-control.bootstrap-table-filter-control-' + column.field).datepicker(column.filterDatepickerOptions) .on('changeDate', function (e) { - $(sprintf(".%s", e.currentTarget.classList.toString().split(" ").join("."))).val(e.currentTarget.value); + $(sprintf("#%s", e.currentTarget.id)).val(e.currentTarget.value); //Fired the keyup event $(e.currentTarget).keyup(); });