我遇到了显示datetimepicker的问题。单击shankar的ID时,我两次获得了datetimepicker。我在下面提到了屏幕截图
<input class="form-control date" data-date-format="yyyy-mm-dd hh:ii" data-link-field="dtp_input1" placeholder="select to validity" name="from_validity" type="text" id="shankar" value="">
$('#shankar').datetimepicker();
最佳答案
此代码将帮助您:
<body>
<input class="form-control date" data-date-format="yyyy-mm-dd hh:ii" data-link-field="dtp_input1" placeholder="select to validity" name="from_validity" type="text" id="shankar" value="">
</body>
</html>
<script>
$("#shankar").click(function () {
$("#shankar").datepicker('show').on('changeDate',function(ev){
$('.datetimepicker').hide();
});
});
</script>
关于javascript - Bootstrap Datetimepicker显示两次,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41014587/