Datetime column in ColumnDataSource in the client (browser/javascript) side

Hi,
I’m using a CustomJS callback to access a ColumnDataSource. The problem is that I want to treat date-time columns automatically in some way, but they appear as float64 in the browser (yeah, yeah. I know it’s converted automatically).

My question is this: is there some way of knowing that the original dtype of the column was date-time, or am I doomed to treat it as numerical?

Thanks!

is there some way of knowing that the original dtype of the column was date-time

Of course - you’re in complete control of your code. Just compute the dtypes beforehand and pass it via args to CustomJS in some way that’s easily serializable, like a dict of strings to strings.

@p-himik
That did it. Thanks.
However, is there a more general way? Anything embedded in the ColumnDataSource or similar?
I wish to transform my CustomJS into a tool, so there I wish to have the code more general?

I don’t think so, no - you will have to invent it.

Thank you!