rushikesh
Posts: 31
Joined: Wed Jul 20, 2022 10:14 am

Date picker is not behaving correctly

https://www.highcharts.com/demo/stock/basic-line

If you check date picker in input range in above link, there are two fields, from date and to date.

If I select a date in TO DATE field in date picker, then the date is exclusive not inclusive.

So, I want to make TO DATE field inclusive. If I enter 23 November 2022 then date including 23 November then it should include data of whole 23 November as well.

I tried inputDateParser, but event is not getting called.

Let me know fi further details required.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Date picker is not behaving correctly

Hello rushikesh!
We appreciate you reaching out to us!

Well, the behaviour you are describing is the default one for the date picker, but you can change it a little bit by using xAxis.events.afterSetExtremes and fire the setExtremes method with one day extra.

Demo: https://jsfiddle.net/BlackLabel/L7edqbkr/
API Reference: https://api.highcharts.com/class-refere ... etExtremes

Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Stock”