score:0

Accepted answer

You should get the date from your input fields by accessing:

document.getElementById('from').value;

EDIT: A better way would be to use the jQuery datepicker events:

$('.selector').datepicker({
    onSelect: function(dateText, inst) { ... }
});

and try to get the date as a javascript date object.

To set the range of the charts axis you can use:

chart.xAxis[0].setExtremes(Date.UTC(startYear, startMonth - 1, startDay), Date.UTC(endYear, endMonth - 1, endDay));  

In your submit function. The chart will automatically redraw after the axis extremes are set.


Related Query

More Query from same tag