我正在尝试将引导日期选择器合并到我的HTML表单中,但它没有按预期工作。
HTML
<div class="submit-row">
<form enctype="multipart/form-data" action="upload_file_text.php" method="post" class="form-group">
<div class="submit-column">
<br>
<input name="ip_uploaded" type="file" class="inputfilebutton"/>
<br>
<button type="submit" class ="submitter" name="submit" >Analyze</button>
<br><br>
</div>
<div class="submit-column">
<div class="input-group date" data-provide="datepicker">
<input class="form-control" type="text"/>
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
<br>
</div>
</form>
jQuery的
$(document).ready(function() {
$('.datepicker').datepicker({
format: "yyyy/mm/dd",
clickInput: true
});
});
您正尝试将datepicker附加到具有类'datepicker'的元素,但您没有该类的元素。