How to use date picker in code igniter using twitter bootstrap??

1.Download necessary files from here

2.Copy all the required files to css,less and js of your codeigniter folder..

3. Add the following lines to your php file..

<link rel=”stylesheet” type=”text/css” href=”<?php echo base_url().’css/datepicker.css’?>”/>
<link rel=”stylesheet/less” type=”text/css” href=”<?php echo base_url().’less/datepicker.less’?>” />

<script src=”<?php echo base_url().’js/bootstrap-datepicker.js’?>”></script>

4. Add this code in php file..

<div class=”input-append date” id=”datepicker” data-date=”” data-date-format=”dd-mm-yyyy” >
<input class=”span2″ size=”16″ type=”text” value=”” disabled>
<span class=”add-on”><i class=”icon-th”></i></span>
</div>

<script>
$(‘#datepicker’).datepicker();
</script>

Now execute your php file and verify the date picker is working or not?? simple.. 😉

Try this too or use HTML5 date