ka215 / jquery.timeline

You can easily create the horizontal timeline with two types by using this jQuery plugin.
MIT License
240 stars 43 forks source link

Rulers locale and and custom options bug #61

Closed menjic closed 3 years ago

menjic commented 4 years ago

Top and bottom rulers are configured with identical options:

// displays ruler ruler: { bottom: { lines: ["year", "month"], locale: "sr-Latn-RS", format: { custom: "%Y%m" } }, top: { lines: ["year", "month"], locale: "sr-Latn-RS", format: { custom: "%Y%m" } } },

Bottom ruler shows correctly, year line is 4 digit year and month line is two digit month,

Top ruler has a bug, it shows year row with month included in my case 1.1.2020. because of locale but changing locale just changes format for example US gives you year like 1/1/2020.

Months line is displayed in my case like 1.8. but if you inspect code you can see value 1.8.2020. so it is whole year, day and month for both year line and month line.

Additionally bottom ruler has bug with locale, setting the locale has influence only on top ruler, not the bottom, what ever you set in options only top ruler is changing bottom stays in this default format, year line is 4 digit year month line is two digit month.

Screenshot is attached for better understanding:

jqtl

ka215 commented 3 years ago

Fixed this issue in version 2.1.0.