year-calendar / js-year-calendar

A fully customizable year calendar widget
https://year-calendar.github.io/
Apache License 2.0
194 stars 71 forks source link

In a clean installation, how I can set Language? #66

Closed regorodrijl closed 3 years ago

regorodrijl commented 3 years ago

I have a clean installation in pure js. I imported cdn from js and css like the "get started guide" references here: https://year-calendar.github.io/js-year-calendar/getstarted

When I initialize the Object Calendar. $(document).ready(function() { const calendario = new Calendar('#calendar', { enableRangeSelection: true, selectRange: function(e) { console.log({ startDate: e.startDate, endDate: e.endDate }); }, language: 'es' }); });

The language of the calendar doesn't change, If i execute calendario.getLanguage(), the console returns "en".

How I can solve the problem? what is wrong?

Thanks

Paul-DS commented 3 years ago

You need to import the locale file. Please check the Language section in the readme.

regorodrijl commented 3 years ago

Hi! thanks, to answer and solve my problem.