Another datepicker / DataTables conflict?
Another datepicker / DataTables conflict?
Hello dear all,
First of all I'm less than beginner on dev.
I'm using Laravel 5.4, in master template I have the following scripts inclusions:
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<script src="js\DataTables-1.10.15\DataTables.js"></script>
<script src="js\bootstrap-dropdownhover.min.js"></script>
<script src="js\scripts.js"></script>
<script src="js\SweetAlert\sweetalert.min.js"></script>
In html view:
<form>
<input id="dataFabricatiei" name="dataFabricatiei" type="date"/>
</form>
In scripts.js
$('#dataFabricatiei').datepicker();
I get this error in browser console and datatable don't work animore:
scripts.js:28 Uncaught TypeError: $(...).datepicker is not a function
at HTMLDocument.<anonymous> (scripts.js:28)
at fire (DataTables.js:3244)
at Object.fireWith [as resolveWith] (DataTables.js:3374)
at Function.ready (DataTables.js:3594)
at HTMLDocument.completed (DataTables.js:3629)
(anonymous) @ scripts.js:28
fire @ DataTables.js:3244
fireWith @ DataTables.js:3374
ready @ DataTables.js:3594
completed @ DataTables.js:3629
Thank you for your time,
Radu Cruceana
Replies
I've got it!
Data Tables should be included BEFORE Bootstrap date-picker
Correct order is:
Thanks for posting back. Good to hear you've got it working.
Allan
Thank you Allan.
And thank you for such an awesome product!
can you please help me with my new question?
I badly need to end this project