☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

DateSlider value in javascript callback

Community Support
Aso
Aso

Hi,
I tried to convert a DateSlider value (original python’s datetime.datetime object) to a Javascript Date, then I need to convert it back to string as follows:

var date = new Date(cb_obj.value*1000);

``

But the result Date was not correct. What is the correct way to do it? or how can I get a string from cb_obj.value in my CustomJS callback.

Thanks

⌁   Link to post
Aso
Aso

Bokeh 0.12.14 server on Ubuntu 16.04 and Python 3.6.3, Chrome client

···

On Thursday, March 15, 2018 at 7:21:52 PM UTC, Aso wrote:

Hi,
I tried to convert a DateSlider value (original python’s datetime.datetime object) to a Javascript Date, then I need to convert it back to string as follows:

var date = new Date(cb_obj.value*1000);

``

But the result Date was not correct. What is the correct way to do it? or how can I get a string from cb_obj.value in my CustomJS callback.

Thanks

⌁   Link to post

End of archived discussion · Replies are disabled