mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Fix jQuery UI dateFormat conflict
Fixes issue with Dates not being parsed correctly when using a date that new Date() doesn't understand!
This commit is contained in:
parent
8310e01197
commit
1dff5bd883
@ -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
|
||||
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user