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

fix(datepicker): Check if getter.assign is function fixes #3155 #3345

Closed
wants to merge 1 commit into from
Closed

Conversation

rvanbaalen
Copy link
Contributor

Closes #3155

@@ -490,7 +490,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
if ( key === 'datepickerMode' ) {
var setAttribute = getAttribute.assign;
scope.$watch('watchData.' + key, function(value, oldvalue) {
if ( value !== oldvalue ) {
if ( typeof setAttribute === 'function' && value !== oldvalue ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use angular.isFunction

@karianna karianna added this to the 0.13.x milestone Apr 15, 2015
@JohannesRudolph
Copy link

@rvanbaalen would you be able to update your pull request? Should be trivial to merge then.

@JohannesRudolph
Copy link

I can confirm this fix works using angular.isFunction

@rvanbaalen
Copy link
Contributor Author

Working on it.

@rvanbaalen
Copy link
Contributor Author

Had to create a new PR since I previously trashed my bootstrap fork. Will merge when Travis is done.

rvanbaalen pushed a commit that referenced this pull request May 28, 2015
@rvanbaalen
Copy link
Contributor Author

Landed in ed10899

@rvanbaalen rvanbaalen closed this May 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date picker TypeError: setAttribute is not a function setAttribute(scope.$parent, value);
4 participants