Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 473.9k

How to get correct date range in Jquery using datepicker

Nov 28 2019 8:08 AM
Hi Team
 
I have datepicker using Jquery UI, from start to end. Now the problem during download on my csv file, i only get current date stamp of today. Is there a better way to do this? Please assist, my download of csv file access all channels on my thingspeak fromstart to enddate. 
 
<div class = "container"> <div class="input-daterange input-group" id="datepicker"> <input type="text" class="input-sm form-control" name="from" placeholder="startdate"/> <span class="input-group-addon">To</span> <input type="text" class= "input-sm form-control" placeholder="enddate"/> </div> </div><br>
 
 // date functionality     $(function() {     $('.input-daterange').datepicker({       autoClose:true,       dateFormat: 'mm/dd/yy'      });   });  $(function() {   $("#download").click(function(e) {     var isTemp =($('#temperature').is(':checked')); if(isTemp){ window.open('start=2019-11-28T00:00+02:00&end=2019-11-29T00:00+02:00'); }   }); });

Answers (1)