alenaksu / mdPickers

Material Design date/time pickers for Angular Material
MIT License
293 stars 216 forks source link

Cannot read property 'hours' of undefined #169

Closed inaffect-ag closed 7 years ago

inaffect-ag commented 7 years ago

angular: v.1.6.0 angular-material: v.1.1.1 mdPickers: v.0.7.5

i tried to use $mdpTimePicker($scope.currentTime) as a service, but got this error:

angular.js:14324 TypeError: Cannot read property 'hours' of undefined
at s.init (mdPickers.min.js:692)
at new s (mdPickers.min.js:706)
at Object.invoke (angular.js:4839)
at $controllerInit (angular.js:10692)
at nodeLinkFn (angular.js:9569)
at compositeLinkFn (angular.js:8878)
at publicLinkFn (angular.js:8743)
at boundTranscludeFn (angular.js:8921)
at Object.controllersBoundTransclude [as transclude] (angular.js:9688)
at angular.js:31368

since the codepen demo works fine, i was thinking it might be a problem with angular/angular-material - could that be?

is there something i could do to make it work?

inaffect-ag commented 7 years ago

problem really was angular v1.6.0 i downgraded and now it works