Search code examples
jqueryjquery-uidatetimepicker

Jquery function cannot be found


I've been having problems with Jquery Datetime picker. The slider wouldn't work on touch devices. Luckily the solution has since been found and Implemented

But updating the Jquery datetimepicker code, is giving me the error:

$tp.find(".ui-slider:visible").sliderAccess is not a function

This is coming from the Jquery Datetime picker file itself, so is not code I have written.

The only logical thing I can think of is, I'm missing a dependancy? But there is no mention for one.

$(".dateTimePicker").datetimepicker({ dateFormat: 'dd/mm/yy' , addSliderAccess: true, sliderAccessArgs: { touchonly: false} }); // dateFormat: 'dd/mm/yy'
$(".datePicker").datepicker({ dateFormat: 'dd/mm/yy', showButtonPanel: true }); // dateFormat: 'dd/mm/yy'
$(".timePicker").timepicker({ stepMinute: 5, addSliderAccess: true, sliderAccessArgs: { touchonly: false} });

Does anyone know what Im doing wrong.


Solution

  • Are you including all of the .js files? Looking at the source code of example page you can see it's including

        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
        <script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>