PHP - 用于datepicker的Bootstrap glyphicon(日历)包装到下一行

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.

You have to use input-group if you wish to bind another element on the INPUT..

sample

<div class="input-group">
      <input type="text" class="form-control" placeholder="Search for...">
      <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
    </div>

see bootstrap's documentation https://getbootstrap.com/docs/3.3/components/#input-groups

If necessary, you can customize the positioning of the icon.

Thanks victor, I solved the problem with your suggestion.

Here is the complete code if someone will have the same problem in future:

<div class="row">
   <div class="col-sm-2 col-lg-2">
    <div class="form-group date">

   <label for="data">Data:</label>
                <div class="input-group">   
      <input type="text" class="form-control"  id="datepicker" placeholder="Data" name="data" value="<?php echo($data); ?> ">
      <span class="input-group-btn">
        <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-calendar"></span></button>


                    </div></div>
</div></div>