alexcode / vue2vis

A Vuejs 2 adapter for Visjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"locale" option not working

alexh225 opened this issue · comments

Hi,
I'm trying to change the localisation from "en" to "de".
From Vis documentation (http://visjs.org/docs/timeline/#Methods) I see that there is an option for that, as long moment.js with locales is installed.
In my vue.js project I have added moment.js and got it working, so that the localisation is set global to "de".
But it seems that if I configure the options for the timeline like below, it doesn't have any effect at runtime:
... timeline: { groups: [ { "id": "0", content: 'Timeline 1' }, ], items: [ { id: '0', group: '0', start: new Date(), content: 'event', title: 'xxx', className: '' }, ], options: { locale: 'de', } } ...
Do I missing something else?
Best regards
Alex

Update: The option is working just fine, and is just related to VISjs anyway.
My fault was that the moment js constructor in my vue application wasn't applied to the property / option "moment" of the timeline correctly. http://visjs.org/docs/timeline/#Configuration_Options