Malcr001
Malcr001

Reputation: 8289

Angularstrap datepicker not working

I'm using AngularJS with requireJS with angularstrap. Right now I simply want to get a datepicker working in my modal box which also uses angularstrap and bootstrap but I keep recieving the error:

Cannot read property 'dates' of undefined

myctrl1.js is the file that downloads datepicker.js and I have all my dependancies in main.js listed. I have never been able to get what should be a fairly simple thing to work so posting here is my last resort.

Plunkr here: LINK

Main files are index.html, controllers.js, myctrl.js

Upvotes: 1

Views: 2081

Answers (2)

rocco66
rocco66

Reputation: 11

Perhaps you forgot add bootstrap-datepicker.js on your page. I had same problem and this was solution.

Upvotes: 1

mtt
mtt

Reputation: 106

I had the same issue when using jQueryUI. This datepicker is incompatible with jQueryUI datepicker (both use datepicker name), so you should remove jQueryUI from your code or do some namespace workaround.

Upvotes: 2

Related Questions