Skip to content

Commit

Permalink
Merge pull request #403 from Craga89/patch-1
Browse files Browse the repository at this point in the history
Fix jQuery UI dateFormat conflict
  • Loading branch information
Mottie committed Oct 30, 2013
2 parents 8310e01 + 001963f commit 2bfdc76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/jquery.tablesorter.widgets-filter-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ $.tablesorter.filterFormatter = {
var localfrom = o.defaultDate = o.from || o.defaultDate;

closeFrom = o.onClose = function( selectedDate, ui ) {
var from = new Date( selectedDate ).getTime() || '',
var from = new Date( $cell.find('.dateFrom').datepicker('getDate') ).getTime() || '',
to = new Date( $cell.find('.dateTo').datepicker('getDate') ).getTime() || '',
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
$cell
Expand All @@ -542,7 +542,7 @@ $.tablesorter.filterFormatter = {
o.defaultDate = o.to || '+7d'; // set to date +7 days from today (if not defined)
closeTo = o.onClose = function( selectedDate, ui ) {
var from = new Date( $cell.find('.dateFrom').datepicker('getDate') ).getTime() || '',
to = new Date( selectedDate ).getTime() || '',
to = new Date( $cell.find('.dateTo').datepicker('getDate') ).getTime() || '',
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
$cell
.find('.dateRange').val(range)
Expand Down
Loading

0 comments on commit 2bfdc76

Please sign in to comment.