From 009c8c5f208fd5fd0ea0c44f81ee531946de70bb Mon Sep 17 00:00:00 2001 From: Mottie Date: Sat, 1 Mar 2014 08:13:30 -0600 Subject: [PATCH] Filter widget docs: add note about placeholder. Fixes #522. --- docs/example-widget-filter.html | 8 ++++++++ js/jquery.tablesorter.widgets-filter-formatter.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/example-widget-filter.html b/docs/example-widget-filter.html index 9bf507e6..c3cbc7c2 100644 --- a/docs/example-widget-filter.html +++ b/docs/example-widget-filter.html @@ -270,6 +270,14 @@ $(function(){

Methods

+

Set Filter Placeholder Text

+
+ Set a data-placeholder attribute on the associated table header with your desired placeholder text +
<th data-placeholder="Enter Something">Name</th>
+ or, set the header cell's jQuery data +
$('.tablesorter th:eq(0)').data('placeholder', 'Search for...')
+
+

filterReset

Use the filterReset method to reset (clear) all of the current filters using this method diff --git a/js/jquery.tablesorter.widgets-filter-formatter.js b/js/jquery.tablesorter.widgets-filter-formatter.js index d23106e8..ba5ef586 100644 --- a/js/jquery.tablesorter.widgets-filter-formatter.js +++ b/js/jquery.tablesorter.widgets-filter-formatter.js @@ -487,7 +487,7 @@ tsff = ts.filterFormatter = { endOfDay : true, // include ANY jQuery UI spinner options below - defaultDate : '', // ******************************** FIX THIS ******************************************* + defaultDate : '', changeMonth : true, changeYear : true,