-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pickers not selecting values when ngModelOption.updateOn is set on the input #186
Comments
Hi, Do you have any update the above issue, i am also facing the same with the ng-model-options. It would be nice if you replay on this. |
Sorry not been working on this library much lately. Looking at the code, it seems that you we could probably sort this by changing this line....
to
This would fix the problem but would overwrite the updateOn blur option all together. If you wanted to keep updateOn (which only applies to input fields), then we would need to create a separate copy of modelOptions for the datepicker which did not use the updateOn blur option, because a blur event never happens. |
Hi After done this modification now it is taking the ngmodeloptions on blur event but if we select the date form the date picker "ngModel.$viewChangeListeners.push(function () {" function to update the value to the model is not triggering. Can u plz check on this. |
What about this?? https://plnkr.co/edit/OmxkChcPzluFNfu7py9s Here i have updated the component slightly, and wonder if it helps you. If so, i can make these changes and put live. |
Hi, Thank you for your quick help. Your code to manually trigger the blur event working fine. Please push the changes so will pull and implement it. Please let me know once you push the modified changes. |
New version published for you |
Hi, I am getting below error in ipad, can you please help me with this. Datepicker directive: "ng-model" value must be a Date object. I am getting the date objects from the service and passing those values using new Date(value) and it is giving error |
what format are your dates from the service? |
I am parsing this format with new Date(2018-04-16 12:07:00). I am getting this error only in safari. Got the solution now it is working fine. |
This may help you. #222 I am going to release new version with this fix shortly |
@mahendra2125 2.6.2 is now released. Upgrade and this should fix your issue |
When I add ng-model-options="{ updateOn: 'blur' }" to the input element, the datepicker and timepicker stop updating the input and model, and stop closing themselves.
It appears that $viewChangeListeners is not being triggered anymore and therefore dateSelection() is not being called by ng-change.
https://plnkr.co/edit/XF2mduZsuNsaSC7Q1Vgs?p=preview
The text was updated successfully, but these errors were encountered: