Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Preview: Event Calendar Module


Reply

293 Posts   41979 Views

Avatar
mobius

13 May 2009 at 4:44pm Community Member, 54 Posts

When I try and view my newly created Calendar page. The area where the calendar picker should be just has the loading gif showing...

Avatar
UncleCheese

14 May 2009 at 1:16am 4085 Posts

Check for Javascript errors.

Avatar
mobius

14 May 2009 at 8:27am Community Member, 54 Posts

...that is the error I'm getting.

jQuery("#calendar-widget").datePicker is not a function
(?)()()calendar...242188019 (line 4)
onreadystatechange()()jquery-1...242188019 (line 27)
onreadystatechange()()jquery-1...242188019 (line 27)
nodeName()([function()], function(), undefined)jquery-1...242188019 (line 21)
onreadystatechange()()jquery-1...242188019 (line 27)
[Break on this error] .datePicker({inline:true, startDate : ...Start : start_date, rangeEnd: end_date})


Line 4 of event_calendar/javascript/calendar_widget.js

Avatar
UncleCheese

17 May 2009 at 3:45am 4085 Posts

Is the date_picker.js file being pulled in at all?

Avatar
mobius

18 May 2009 at 9:31am Community Member, 54 Posts

You mean /event_calendar/javascript/jquery.datePicker.js?

Yes, it appears to be - maybe loaded in the wrong order or something?

Avatar
UncleCheese

18 May 2009 at 10:19am (Last edited: 18 May 2009 10:19am), 4085 Posts

Sounds like some kind of conflict. Start removing dependencies and see if it clears up. Also, make sure you can navigate to and read the url of datePicker.js that is being pulled into your HTML.

Avatar
mobius

18 May 2009 at 10:39am Community Member, 54 Posts

Ah, yes I removed my JS requires and it works - but of course, that now breaks other parts of my site.

I solved it by changing

<% require javascript(jsparty/jquery/jquery.js) %>

to

<% require javascript(event_calendar/javascript/jquery-1.2.6.min.js) %>

Shouldn't the module try and use the central jquery library instead of duplicating it?

Avatar
UncleCheese

19 May 2009 at 9:31am 4085 Posts

Interesting. Yeah, I didn't want to rely on the SS jquery resource because they seem really slow to update it. I know the EventCalendar jQuery version is still a version behind, but at least this way I don't have to wait for them to upgrade to 1.3. I can do it on my own.