Skip to content

Commit

Permalink
Merge pull request wenzhixin#3076 from jvdmr/unique-datepicker-filter
Browse files Browse the repository at this point in the history
Fix wenzhixin#3063 - create id on datepicker fields, use it to set value
  • Loading branch information
wenzhixin authored Dec 16, 2017
2 parents e125b74 + 4641beb commit 4adb7ce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,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));
}
}

Expand Down Expand Up @@ -364,7 +364,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();
});
Expand Down

0 comments on commit 4adb7ce

Please sign in to comment.