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

ng-model-options with datepicker #5825

Closed
benhalverson opened this issue Apr 19, 2016 · 4 comments
Closed

ng-model-options with datepicker #5825

benhalverson opened this issue Apr 19, 2016 · 4 comments

Comments

@benhalverson
Copy link

benhalverson commented Apr 19, 2016

Bug description:

When using ng-model-options="{updateOn: 'blur'}" with the UIB Datepicker, the calendar does not disappear after selecting a date. Removing ng-model-options="{updateOn: 'blur'}" makes the calendar work again. ng-model-options="{updateOn: 'default blur'}" also does not work.

Expected Results:
ng-model-options="{updateOn: 'default blur'}" or ng-model-options="{updateOn: 'blur'}" should work.
https://docs.angularjs.org/api/ng/directive/ngModelOptions

Link to minimally-working plunker that reproduces the issue:

http://plnkr.co/edit/LyWR5miigK76tQo7OwuY

Version of Angular, UIBS, and Bootstrap

Angular: 1.4.0

UIBS: 1.1.2

Bootstrap: 3.2

@wesleycho
Copy link
Contributor

Hey @benhalverson !

You actually stumbled upon an issue that we're already discussing some in #5811 - I agree with your thoughts on this.

@benhalverson
Copy link
Author

@wesleycho I'm interested in submitting a PR for this issue. Can you point me in the right direction? Unfortunately I can't do it during working hours.

@wesleycho
Copy link
Contributor

I think there might have to be modifications in both the datepicker and datepicker-popup components for supporting this - basically we need to somehow decouple the config of the two components so that one can independently modify the ng-model-options of both the popup and inline datepicker.

It may be possible to just do it on the datepicker-popup alone, but I haven't investigated it in depth.

@wesleycho
Copy link
Contributor

So I believe I have the fix - @benhalverson can you check out #5933 and the Plunker that it works the way you expect?

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

Successfully merging a pull request may close this issue.

2 participants