选择日期后如何更改输入值

时间:2018-11-01 11:14:44

标签: jquery datepicker

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='input-group date' id='datetimepicker8'>
  <input type='text' class="form-control" id="dateOfDeparture" name="dateOfDeparture" value="" />
  <span class="input-group-addon  ">
        <span class="glyphicon glyphicon-calendar"></span>
  </span>
</div>
<script>
  $('#dateOfDeparture').change(function(e) {
    var valuefirstone = $(this).val(); //use jquery built in functions
    alert(valuefirstone);
  });
</scipt>

0 个答案:

没有答案