jquery - Using bootstrap datepicker in Laravel 4 form -


i'm having trouble trying use bootstrap date-picker (http://tinyurl.com/o7njj9n).

i tried using suggestions these 2 threads: laravel using twitter bootstrap , datepicker , laravel 4 bootstrap-datepicker not luck in solving problem.

currently, have form field:

{{ form::text('date', null, array('type' => 'text', 'class' => 'form-control datepicker','placeholder' => 'pick date task should completed', 'id' => 'calendar')) }} 

i reference css , js in master template, such:

<link rel="stylesheet" href="css/datepicker3.css">  <script type="text/javascript" src="/bootstrap-datepicker.js"></script> 

i have following javascript:

<script type="text/javascript"> $(document).ready(function() {      $('#calendar').datepicker({     });  } ); </script> 

i'm not sure what's wrong?

thanks help.

edit: problem calendar not appear upon clicking inside text field.

the problem solved moving 'date-picker.js' script dependency below jquery dependency. bit silly, guess, i'm new web-dev :/


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -