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

Custom Format for datepicker combined with ngRequired causing issues with binding #4678

Closed
codenewa opened this issue Oct 21, 2015 · 3 comments

Comments

@codenewa
Copy link

Libraries:
Angular JS: v1.4.7
Angular JS animate: v1.4.7
Angualr ui: 0.14.2

Here's the plnkr

So far, I have seen this issue only when format is provided with uib-datepicker-popup and it also includes a ngRequired expression. As you can see in the plnkr, the date field disappears from the model.

So, the snippet will work properly if you remove
ng-required="data.config.dob.isRequired"
or, change
uib-datepicker-popup="MM/dd/yyyy" to uib-datepicker-popup

One more observation was that this affects all other datepickers on the page whether or not they have the format and ngRequired combination.

This might be related to: #4607

@icfantv
Copy link
Contributor

icfantv commented Oct 21, 2015

Currently evaluating options here, but as noted, the demo is working fine. The issue appears to be setting a hard-coded string in uib-datepicker-popup vs. setting via a scope variable. For now, you can use that as a work around.

@icfantv
Copy link
Contributor

icfantv commented Oct 21, 2015

@codenewa, this was fixed in #4635. To get all the fixed goodness, you can do a snapshot build of master by running the npm install and grunt commands.

@icfantv
Copy link
Contributor

icfantv commented Oct 21, 2015

Duplicate of #4616 and #4607.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants