Vue2-datepicker: Custom localization (lang) is not used for date formatting

Created on 4 Mar 2019  路  4Comments  路  Source: mengxiong10/vue2-datepicker

I need to set a custom russian localization for my users. In Russia, dates are formatted differently, so I have to use the format prop.

Unforutnately, this prop formats dates using English locale only, resulting in the following language mess, which will result in a bad user experience:
image

Notice the cyrillic russian language everywhere except the input field.


P.S. Thank you for the most comprehensive calendar out there, tho!

Most helpful comment

When I release v3.0, I'll close it.

All 4 comments

Thanks for your feedback.
Fix it requires a breaking change version, you can temporarily use it like this.

import DatePicker from 'vue2-datepicker'

// Customize by yourself
DatePicker.fecha.i18n.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']

https://github.com/mengxiong10/vue2-datepicker/issues/111#issuecomment-399625732

When I release v3.0, I'll close it.

Thank you for the response! Your workaround helped.

I'll keep this issue open for task-tracking purposes then.

fixed it in v3.0

Was this page helpful?
0 / 5 - 0 ratings