debug: 電站資訊-單頁(即時資訊)卡住不顯示

This commit is contained in:
wanling040@gmail.com 2022-07-08 09:37:45 +08:00
parent 40bbbc9235
commit 3db7f8647c

View File

@ -211,8 +211,10 @@
var today_format = today.toISOString().slice(0, 10).replace(/-/g, "/"); var today_format = today.toISOString().slice(0, 10).replace(/-/g, "/");
//var dateLimit_format = dateLimit.toISOString().slice(0, 10).replace(/-/g, "/"); //var dateLimit_format = dateLimit.toISOString().slice(0, 10).replace(/-/g, "/");
//datepicker.data('daterangepicker').setStartDate(dateLimit_format); //datepicker.data('daterangepicker').setStartDate(dateLimit_format);
datepicker.data('daterangepicker').setStartDate(today_format); if (datepicker.length != 0) {
datepicker.data('daterangepicker').setEndDate(today_format); datepicker.data('daterangepicker').setStartDate(today_format);
datepicker.data('daterangepicker').setEndDate(today_format);
}
//$('#date-range-history').val(dateLimit_format + ' - ' + today_format); //$('#date-range-history').val(dateLimit_format + ' - ' + today_format);
$('#date-range-history').val(today_format + ' ~ ' + today_format); $('#date-range-history').val(today_format + ' ~ ' + today_format);
//alert(" date-range-history = "+$('#date-range-history').val()); //alert(" date-range-history = "+$('#date-range-history').val());
@ -839,7 +841,7 @@
locale: { format: 'YYYY/MM/DD' }, locale: { format: 'YYYY/MM/DD' },
opens: 'left' opens: 'left'
}, function (start, end, label) { }, function (start, end, label) {
@* console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));*@ @* console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));*@
}); });
$('#date-range-exception').on('apply.daterangepicker', function (ev, picker) { $('#date-range-exception').on('apply.daterangepicker', function (ev, picker) {
@ -1652,7 +1654,6 @@
datepicker.data('daterangepicker').setStartDate(dateLimit_format); datepicker.data('daterangepicker').setStartDate(dateLimit_format);
datepicker.data('daterangepicker').setEndDate(today_format); datepicker.data('daterangepicker').setEndDate(today_format);
$('#date-range-record').val(dateLimit_format + ' - ' + today_format); $('#date-range-record').val(dateLimit_format + ' - ' + today_format);
$('#date-range-record').trigger('change'); $('#date-range-record').trigger('change');
} }