spazmodius
Posts: 3
Joined: Tue Dec 21, 2021 8:59 pm

How to enter times in RangeSelector inputs?

For the life of me, I cannot figure out how to simply type a time-range into the range selector. Enter does nothing. Clicking or tabbing out reverts any input.

https://jsfiddle.net/kdaxj18u/2/
🎱 Concentrate and ask again
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: How to enter times in RangeSelector inputs?

Hi spazmodius,

Welcome to our forum and thanks for contacting us with your question!

Set inputDateFormat: to '%b %e, %Y %H:%M'. Select range that you want and press enter to confirm.
Demo: https://jsfiddle.net/BlackLabel/L1xb2uop/

Let me know if that was what you were looking for!
Regards!
Mateusz Bernacik
Highcharts Developer
spazmodius
Posts: 3
Joined: Tue Dec 21, 2021 8:59 pm

Re: How to enter times in RangeSelector inputs?

Using that format, the inputs do become responsive to Enter, so thank you for that. However, now it shows a date with time, which is undesirable--my data is always on a single date.

This used to work perfectly, it would call my custom `inputDateParser`. At some point it changed to this silly time picker control that doesn't work. Can I set it back to a trusty text input?
🎱 Concentrate and ask again
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: How to enter times in RangeSelector inputs?

Hi spazmodius,

Unfortunately previous input is gone. However, you can still have something similar and use inputDateParser.
Demo: https://jsfiddle.net/BlackLabel/jm6gef9r/

Alternatively, you could create your own custom input and a parser and apply selected date range with setExtremes method, which by the way is used by Highcharts input and range selector under the hood.

Let me know if you have any further questions!
Regards!
Mateusz Bernacik
Highcharts Developer
spazmodius
Posts: 3
Joined: Tue Dec 21, 2021 8:59 pm

Re: How to enter times in RangeSelector inputs?

That's a great example. Aside from the high-precision display, it's ideal.

Thanks
🎱 Concentrate and ask again
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: How to enter times in RangeSelector inputs?

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”