Change Bootstrap datepicker format -
i using bootstrap datepicker , want change format 'dd-mm-yyyy' nothing seems work.
$(document).ready(function () { $('#datepicker').datepicker({ format: 'dd-mm-yyyy' }); });
is script wrong?
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="site/css/bootstrap.min.css" rel="stylesheet"> <link href="site/css/style.css" rel="stylesheet"> <link href="site/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css" rel="stylesheet"> <script src="site/js/jquery-1.12.3.js"></script> <script src="site/js/bootstrap.js"/></script> <script src="site/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"/></script> <script src="site/js/script.js"></script> </head> <body> <!--body--> <!--form--> <div class="col-md-2"> <label for="date-depart">date de départ</label> <div class="input-group date" id="datepicker"> <input type="text" name="datedep" class="form-control datepicker" /> <span class="input-group-addon btn"><i class="glyphicon glyphicon-calendar"></i> </span> </div> </div>
try one
$(document).ready(function () { $('#datepicker').datepicker({ dateformat: 'dd-mm-yyyy' }); });
Comments
Post a Comment