-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Date picker TypeError: setAttribute is not a function setAttribute(scope.$parent, value); #3155
Comments
Could you please create a plunkr showing the issue? |
http://plnkr.co/edit/lSMwdgXmXXu3VA2RQXeI?p=preview
|
This is still pending. For me, this error occurs when I try to set <input
type="text"
class="form-control"
placeholder="{{ 'LABEL.PLEASE_CHOOSE' | translate }}"
id="dob"
name="dob"
ng-model="relation.dob"
max-date="datepickerEighteen"
datepicker-mode="year"
datepicker-popup="dd-MM-yyyy"
datepicker-options="dobOptions"
is-open="dobOpened"
required
readonly="readonly"> The above example does not throw the error. That is because the That seems to work in terms of datepicker functionality: the datepicker opens with the year view. <input
type="text"
class="form-control"
placeholder="{{ 'LABEL.PLEASE_CHOOSE' | translate }}"
id="dob"
name="dob"
ng-model="relation.dob"
max-date="datepickerEighteen"
datepicker-mode="'year'" <!-- mind the single quotes here ' ' -->
datepicker-popup="dd-MM-yyyy"
datepicker-options="dobOptions"
is-open="dobOpened"
required
readonly="readonly"> But when I have
I'm using |
How big are the chances that the fix gets in? It always happens when datepicker-mode is specified as a string literal, whenever you switch the mode browsing the dates. It's fixable by using a binding, though. So I assume that the correct fix would be to not let the scope watch the value at all, since it's a constant string anyway... |
Another Plnkr for this, run in angular 1.3.15 and ui-bootstrap-tpls-0.13.0.js http://plnkr.co/edit/QGlIlxgU4SfkQ7oWVOlX?p=preview |
Fix landed in ed10899 |
The fix in 0.13.1 worked for me. Thanks! I am using "triple-quotes" for the mode: input type="text" ng-model="DOB" datepicker-popup="MM-dd-yyyy" datepicker-mode="'year'" is-open="dobOpen" ng-click="dobOpen = true" /> |
I just updated to ui.bootstrap 1.1.0 and Angular 1.5 and I'm now seeing this issue when i have the mode set to |
Here's a plnkr. The error happens whenever you click on anything within the popup... |
Reopening for investigation. |
here's a workaround to avoid getting error:
and then explicit the ‘min-mode', 'datepicker-mode' and 'datepicker-options' property in the html element from the config object defined on $scope like that
|
This seems fixed in the 1.2 release - see here for an example. |
I got error then datepicker is closed after date is selected
Version: 0.12.0 - 2014-11-16
The text was updated successfully, but these errors were encountered: