JS:
$('#divStartDate').datetimepicker({
viewMode: 'days',
format: 'YYYY/MM/DD',
defaultDate: new Date()
});
Html:
<div class="form-group">
<div class='input-group date' id='divStartDate'>
<input id="txtStartDate" name="txtStartDate" type='text' class="form-control width160px" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
2.取值
$('#divStartDate').data('date');
沒有留言:
張貼留言