I have date picker from startdate and enddate, i want now my datepicker wherever the user select any date or day, it must reads from my Jquery. Please help, meaning my Jquery is manually programmed for a year on my thingspeak URL.
//checking equality for channel fields on thingspeak.
$(function(){
$("#download").click(function(e) {
e.preventDefault();
var isTemperature = ($('#temperature').is(':checked'));
var isButtonState = ($('#button_state').is(':checked'));
if(isTemperature&&isButtonState) {
window.open('https://api.thingspeak.com/channels/952961/feeds.csv?api_key=FDJCRN71YJM2R0FM&start=2020-01-06T00:00+02&end=2020-01-10T23:59+02:00&timezone=Africa/Johannesburg');
}else {
if(isTemperature){
window.open('https://api.thingspeak.com/channels/952961/fields/1.csv?api_key=FDJCRN71YJM2R0FM&start=2020-01-06T00:00+02&end=2020-01-10T23:59+02:00&timezone=Africa/Johannesburg');
}else{
if(isButtonState){
window.open('https://api.thingspeak.com/channels/952961/fields/8.csv?api_key=FDJCRN71YJM2R0FM&start=2020-01-06T00:00+02&end=2020-01-10T23:59+02:00&timezone=Africa/Johannesburg');
}
}
}
});
});