You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.3 KiB

function showElements(elementsClass){
$(elementsClass).css("display", "block");
}
function hideElements(elementsClass){
$(elementsClass).css("display", "none");
}
function showIfNotEqualsHideElse(code1, code2, elementsClass){
if(code1 === code2){
hideElements(elementsClass);
}
else{
showElements(elementsClass)
}
}
function initDatePicker(pickerID, onCloseFunction){
var variable = new Lightpick({
field: document.getElementById(pickerID),
numberOfMonths: 2,
singleDate: false,
onSelect: function (start, end) {
},
onClose: function (start, end) {
onCloseFunction(variable.toString('DD-MM-YYYY'));
}
});
return variable;
}
function getTrimedStringArray(arrayObj) {
let trimedArray = [];
arrayObj.forEach(value => {
trimedArray.push(value.trim());
});
return trimedArray;
}
function generateDayWiseTimeSeries(s, count) {
var values = [
4, 3, 10, 9, 29, 19, 25, 9, 12, 7, 19, 5, 13, 9, 17, 2, 7, 5
];
var i = 0;
var series = [];
var x = new Date("11 Nov 2012").getTime();
while (i < count) {
series.push([x, values[i]]);
x += 86400000;
i++;
}
// series.push([Date.getTime,value]);
return series;
}