Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Datepicker dynamic localization issue #4286

Closed
@popovd

Description

@popovd

Hello,

I have a problem with the inline datepicker not refreshing it's display template on dynamic locale change. More specifically it does not update the days and months labels. I've looked at the ui-bootstrap-tpls.js code and found that the templates have been updated to use the one-time binding (probably for performance reasons) since version 0.13.1. While this decision is certainly by design it causes the developers of applications, supporting on the fly change of locale, to look for workarounds to trick the datepicker control to re-render.

An example of the old (working) behavior can be found here: http://plnkr.co/edit/7LsfG5D28Y7jB9vhEiQV?p=preview
An example of the current (not working) behavior can be found here: http://plnkr.co/edit/qAmjLbEMVAOyFyoRp6qH?p=preview

The module that I use to change the locale dynamically is angular-dynamic-locale (https://github.com/lgalfaso/angular-dynamic-locale). Essentially what it does is replace the $locale object.

Is there an option to revert to the normal binding for the labels in the day.html and month.html?

Best Regards,
Deian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions