i using date time picker of bootstrap calendar coming fine ui not working after selecting date.
this html file
<!doctype html> <html lang="en"> <head> <link href="./css/bootstrap.css" rel="stylesheet"> <link href="./css/datetimepicker.css" rel="stylesheet"> </head> <body> <div class="col-sm-6" style="height:130px;"> <div class="form-group"> <div class='input-group date' id='datetimepicker1'> <input type='text' class="form-control" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"> </span> </span> </div> </div> </div> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <!-- <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> --> <script src="./js/lib/custom.js"></script> <script src="./js/lib/bootstrap.js"></script> <script type="text/javascript" src="./js/lib/bootstrap-datetimepicker.js"></script> <script type="text/javascript" src="./js/lib/bootstrap-datetimepicker.pt-br.js"></script> </body> </html>
this script ui
$(function() { $('#datetimepicker1').datetimepicker({ viewmode: 'years' }); });
console error
file description
directory structure
i try 2 things:
- call datepicker input, not
<div>
like this:
<input type='text' class="form-control" id="datetimepicker1">
- besides 1st point, console error sugest maybe should check relative paths of scripts.
if main file above src folder, try redirect links src="src/main/webapp/js/<your script file>"
, , if file below should try "../"
go 1 level, or src="/src/main/..."
start root folder.
try that, because "./" tricky in doctype html documents.
Comments
Post a Comment