Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 878
IAmGroot Avatar asked Dec 31 '25 16:12

IAmGroot


2 Answers

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>
like image 59
CCBlackburn Avatar answered Jan 02 '26 16:01

CCBlackburn


For convenience, this is where you can get that jquery-ui-sliderAccess.js file. It's non-obvious from the actual project page where to get this.

http://trentrichardson.com/examples/timepicker/js/jquery-ui-sliderAccess.js

like image 26
adavea Avatar answered Jan 02 '26 14:01

adavea