T139 date and time split operational

This commit is contained in:
2021-03-18 17:04:46 +01:00
parent 4d8e34ba27
commit 6cbb7546e0
2 changed files with 48 additions and 6 deletions

View File

@@ -2,8 +2,29 @@ var historyJson = {};
const maxIterations = 30;
function filterHistory(){
var dateFrom = $('#historyFrom').val();
var dateTo = $('#historyTo').val();
var dateFrom = new Date($('#historyFrom').val() + 'T' + $('#historyTimeFrom').val());
console.log(dateFrom);
var dateTo = new Date($('#historyTo').val() + 'T' + $('#historyTimeTo').val());
console.log(dateTo);
// var dateFrom = new Date();
// var dateTo = new Date();
// var timeFrom = new Date();
// var timeTo = new Date();
// dateFrom = Date.parse($('#historyFrom').val());
// console.log(dateFrom);
// dateTo = Date.parse($('#historyTo').val());
// console.log(dateTo);
// timeFrom = Date.parse($('#historyTimeFrom').val());
// console.log(timeFrom);
// timeTo = Date.parse($('#historyToFrom').val());
// console.log(timeTo);
// dateFrom.setTime(timeFrom);
// console.log(dateFrom);
// dateTo.setTime(timeTo);
// console.log(dateTo);
loadHistory(dateFrom, dateTo);
}
@@ -45,6 +66,6 @@ function historyToHtml(){
return innerHTML;
}
const displayHistory = function(){
function displayHistory(){
$('#historyTable tbody').html(historyToHtml());
}

View File

@@ -2,8 +2,29 @@ var historyJson = {};
const maxIterations = 30;
function filterHistory(){
var dateFrom = $('#historyFrom').val();
var dateTo = $('#historyTo').val();
var dateFrom = new Date($('#historyFrom').val() + 'T' + $('#historyTimeFrom').val());
console.log(dateFrom);
var dateTo = new Date($('#historyTo').val() + 'T' + $('#historyTimeTo').val());
console.log(dateTo);
// var dateFrom = new Date();
// var dateTo = new Date();
// var timeFrom = new Date();
// var timeTo = new Date();
// dateFrom = Date.parse($('#historyFrom').val());
// console.log(dateFrom);
// dateTo = Date.parse($('#historyTo').val());
// console.log(dateTo);
// timeFrom = Date.parse($('#historyTimeFrom').val());
// console.log(timeFrom);
// timeTo = Date.parse($('#historyToFrom').val());
// console.log(timeTo);
// dateFrom.setTime(timeFrom);
// console.log(dateFrom);
// dateTo.setTime(timeTo);
// console.log(dateTo);
loadHistory(dateFrom, dateTo);
}
@@ -45,6 +66,6 @@ function historyToHtml(){
return innerHTML;
}
const displayHistory = function(){
function displayHistory(){
$('#historyTable tbody').html(historyToHtml());
}