I have a small problem. When I try to show a datepicker in a form inserting the calendar glypycon , the glypycon wrap on the next line and is long as the date field. I want it instead on the rigth of the field and as small square. this is my code in the head section:
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type='text/javascript' src='//code.jquery.com/jquery-1.8.3.js'></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker3.min.css">
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.min.js"></script>
<script type='text/javascript'>
$(function(){
$('.form-group.date').datepicker({
calendarWeeks: true,
todayHighlight: true,
autoclose: true,
format: "yyyy-mm-dd"
})
});
</script>
and this is the field in the form that give me error:
<div class="row">
<div class="col-sm-2 col-lg-2">
<div class="form-group date">
<label for="data">Data:</label>
<input type="text" class="form-control" id="datepicker" placeholder="Data" name="data" value="<?php echo($data); ?> ">
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div></div>
Thanks in advance.