I have a line chart for messages sent x day/month and I also have two datepickers on top of it. I want to be able to select a start date, an ending date and the chart reads those dates and display this exactly range of points. I already have zoom and pan configured on my chart.js file and I can do it manually, but I was wondering how can I do that through what I just described.
On this picture I have 3 months of data already. It always begins displaying 1 month.

I did it! I created a function to be called after every date change on my datepicker that is like that: