bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

altInputFormats for datepickerPopup is not being dynamically updates

Open angelina999990 opened this issue 9 years ago • 0 comments

The issues forum is NOT for support requests. It is for bugs and feature requests only. Please read https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md and search existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

For datepickerPopup, it only sets the alternate format when directive initial. if the alt-input-formats value changed, it won't update util reloading directive.

Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/uXyBumtqd92m4Q3GvK2r?p=preview

Steps to reproduce the issue:

open the link above:

  1. enter a date string (eg. 2017-1-30);
  2. click 'Change Input Formats' button;
  3. enter a new date string according to new alternate input format. (eg. 01/30/2017);

the selected date will not display any date because the date you just entered is not valid.

  1. try enter a date with format before clicking button (eg. 2017-7-30).

the alt-input-format value changed. but datepickerPopupDirective still use the very first one.

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.7

UIBS: 2.5.0

Browser: Tested in Chrome

angelina999990 avatar Aug 30 '17 07:08 angelina999990