bevacqua / rome

:calendar: Customizable date (and time) picker. Opt-in UI, no jQuery!
https://bevacqua.github.io/rome
MIT License
2.91k stars 223 forks source link

Does not able to use standalone with Require js #114

Closed Ashot-KR closed 4 years ago

Ashot-KR commented 9 years ago

It always throws moment.js dependancy exception. Moment.js does not provide moment variable in global scope any more — i believe it`s a reason.

http://jsbin.com/gusukudari/edit?html,js,output

christianlent commented 9 years ago

I'm having the same problem. The relatively nasty workaround I used was to create a file called "momentglobal" like the following: define([ 'moment', ], function(Moment) { moment = Moment; // Purposefully global });

I was using this with the requirejs shim for a while, but it turns out that didn't work with the r.js optimizer. So, the even more gangster solution was merely to include momentglobal in any relevant scripts immediately before rome.