VOid
VOid

Reputation: 85

datepicker/moment.js ? displaying wrong date in my locale

im integrating twitter bootstrap datepicker plugin, but im having trouble with it.

The plugin in question is this: http://eonasdan.github.io/bootstrap-datetimepicker/

It works fine with default configuration(uses 'en' language as default). But when I try to use different localization for example 'lv' it shows wrong date. The day and month are flipped(shows that current time is july 6 not april 4 what is correct in my location). I checked other localizations and it seems to be wrong too, even in the plugins documentation page, the 'ru' localization example has the same problem.

Correct enter image description here

Wrong enter image description here

For localization this plugin uses moment.js, (it does support 'lv' localization) which I included.

Any idea what wrong?

Thanks for the help!

Upvotes: 1

Views: 2603

Answers (1)

VOid
VOid

Reputation: 85

Managed to fix it by providing date format MM-DD-YYYY hh:mm.

Thanks for anyone who checked this out.

Upvotes: 1

Related Questions