How to get selected date from highstock?

Kok*_*esh 1 highcharts highstock

I am using Highstock to show time based values. I need to get the date range shown in the chart for other purposes. Is there some easy way to get the begin-end values?

And*_*bin 7

使用getExtremes

var extremes = chart.xAxis[0].getExtremes(),
     start = new Date(extremes.min),
     end   = new Date(extremes.max);
Run Code Online (Sandbox Code Playgroud)