ソースを参照

fixed date comparison (#6154)

Dustin Utecht 3 年 前
コミット
5773fe8f74

+ 1 - 1
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -291,7 +291,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
     } else if (column.filterStartsWithSearch) {
       tmpItemIsExpected = (`${value}`).toLowerCase().indexOf(searchValue) === 0
     } else if (column.filterControl === 'datepicker') {
-      tmpItemIsExpected = new Date(value) === new Date(searchValue)
+      tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime()
     } else if (this.options.regexSearch) {
       tmpItemIsExpected = Utils.regexCompare(value, searchValue)
     } else {