When I try and view my newly created Calendar page. The area where the calendar picker should be just has the loading gif showing...
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Check for Javascript errors.
...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
Is the date_picker.js file being pulled in at all?
You mean /event_calendar/javascript/jquery.datePicker.js?
Yes, it appears to be - maybe loaded in the wrong order or something?
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.
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?
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.