Forgot one $.datepicker call

Also cleaned up a few lines for consistancy
This commit is contained in:
Justin F. Hallett 2013-06-10 09:39:55 -06:00
parent 262e455663
commit b82d192fc2

View File

@ -472,7 +472,7 @@ $.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
@ -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()