我有时间动态绑定的应用程序,其中场景可能允许的时间可以为空,
在 Jquery datetimepicker setting allowed time null set as example shows here which should be null
如何设置空时间?
$(document).ready(function(){
try{ $('.DATETIMEFIELD').datetimepicker({
value:'',
datepicker:false,
format:'h:i A',
formatTime: 'h:i A',
step:30 ,
allowTimes: [],
});
}
catch(e){
console.log(e);
};
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.js" id="_carbonads_js" defer></script>
<input type="text" class="DATETIMEFIELD">