<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'); } }); });