mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Forgot one $.datepicker call
Also cleaned up a few lines for consistancy
This commit is contained in:
parent
262e455663
commit
b82d192fc2
@ -472,8 +472,8 @@ $.tablesorter.filterFormatter = {
|
|||||||
o.defaultDate = o.from || o.defaultDate;
|
o.defaultDate = o.from || o.defaultDate;
|
||||||
|
|
||||||
closeFrom = o.onClose = function( selectedDate, ui ) {
|
closeFrom = o.onClose = function( selectedDate, ui ) {
|
||||||
var from = (new Date($cell.find('.dateFrom').datepicker('getDate')).getTime() || ''),
|
var from = new Date($cell.find('.dateFrom').datepicker('getDate')).getTime() || '',
|
||||||
to = new Date( $cell.find('.dateTo').datepicker('getDate') ).getTime() || '',
|
to = new Date($cell.find('.dateTo').datepicker('getDate')).getTime() || '',
|
||||||
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
|
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
|
||||||
$cell
|
$cell
|
||||||
.find('.dateTo').datepicker('option', 'minDate', selectedDate ).end()
|
.find('.dateTo').datepicker('option', 'minDate', selectedDate ).end()
|
||||||
@ -493,8 +493,8 @@ $.tablesorter.filterFormatter = {
|
|||||||
$cell.find('.dateFrom').datepicker(o);
|
$cell.find('.dateFrom').datepicker(o);
|
||||||
o.defaultDate = o.to || '+7d'; // set to date +7 days from today (if not defined)
|
o.defaultDate = o.to || '+7d'; // set to date +7 days from today (if not defined)
|
||||||
o.onClose = function( selectedDate, ui ) {
|
o.onClose = function( selectedDate, ui ) {
|
||||||
var from = new Date( $cell.find('.dateFrom').val() ).getTime() || '',
|
var from = new Date( $cell.find('.dateFrom').datepicker('getDate') ).getTime() || '',
|
||||||
to = new Date( selectedDate + ' 23:59:59' ).getTime() || '',
|
to = new Date( $cell.find('.dateTo').datepicker('getDate') ).getTime() || '',
|
||||||
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
|
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
|
||||||
$cell
|
$cell
|
||||||
.find('.dateFrom').datepicker('option', 'maxDate', selectedDate ).end()
|
.find('.dateFrom').datepicker('option', 'maxDate', selectedDate ).end()
|
||||||
|
Loading…
Reference in New Issue
Block a user