'Power BI custom visual date as string issue

I'm currently passing a data field into a custom visualisation of type 'Date'

I can see from the dataview in the custom vis toolbar that it is passed through as a bunch of functions and a epoch timestamp:dataview with correct date

but when I try and log the same data from the options variable passed through to the public update function, I see this: console with dates as strings

as you can see the dates appear as strings. They are also strings in the code as far as I can tell.

If I rearrange the order of the category fields, they appear correctly: enter image description here

is this a bug or am I doing something stupid?? how do I work around it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source