I'm having some trouble trying to use the bootstrap date-picker (http://tinyurl.com/o7njj9n).
I tried using suggestions from these 2 threads: laravel using twitter bootstrap and datepicker and Laravel 4 with bootstrap-datepicker but not luck in solving the problem.
Currently, this is what I have for my form field:
{{ Form::text('date', null, array('type' => 'text', 'class' => 'form-control datepicker','placeholder' => 'Pick the date this task should be completed', 'id' => 'calendar')) }}
I reference the CSS and JS in my master template, as such:
<link rel="stylesheet" href="css/datepicker3.css">
<script type="text/javascript" src="/bootstrap-datepicker.js"></script>
I have the following javascript:
<script type="text/javascript">
$(document).ready(function() {
$('#calendar').datepicker({
});
} );
</script>
I'm not sure what's wrong?
Thanks for any help.
EDIT: The problem is that the calendar does not appear upon clicking inside the text field.
'data-datepicker' => 'datepicker'from your input field.