Loading JQuery into Joomla 3 for date picker

Loading JQuery into Joomla 3 for date picker

I've been having some trouble lately getting the JQuery datepicker function to work in a custom Joomla module. I use Jumi to integrate a PHP file into the website that displays a datepicker application in the frontend. If I'm using it correctly according to the JQuery website I have to call for the following files:

<script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

Doing it like this works fine, the date pickers does the job and can be used. However, since Joomla comes with its own JQuery library (media/jui/js) I'm wondering how to use the files in this folder instead. At the same time this might avoid certain JQuery conflicts as well. For example I'm having a slider module displayed on the same page and it basically goes ballistic when both are displayed (datepicker + slider). When I disable the call for Jquery-1.9.1 in my application the slider works but the datepicker functionality disappears. I've also tried the following by calling the Joomla Jquery framework:

<?php // load jQuery scripts // loaded from Joomla! 3 JHtml::_('jquery.framework'); JHtml::_('jquery.ui'); $doc =& JFactory::getDocument(); // loaded from the code.jquery.com site $doc->addStylesheet('http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css'); ?>

However, this also prevents the datepicker from working correctly. It looks like the datepicker functionality is not supported in this way. Basically my question comes down to how I can have both the slider and the datepicker application to work in the best way possible without having conflicts.

Other solutions used: - Adding noConflict - Using Easy JQuery

Help is highly appreciated since I'm getting bald pulling my hair out...

    • Topic Participants

    • info