Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bootstrap 4 选择单选按钮时如何清空日期范围_Bootstrap 4_Bootstrap Datepicker_Jquery 3 - Fatal编程技术网

Bootstrap 4 选择单选按钮时如何清空日期范围

Bootstrap 4 选择单选按钮时如何清空日期范围,bootstrap-4,bootstrap-datepicker,jquery-3,Bootstrap 4,Bootstrap Datepicker,Jquery 3,在模式引导4上选择单选按钮时,我无法清空日期范围 这是HTML的代码: 卡南岛 正常的 反常的 日期范围 到 这是代码Ajax/JS: 成功:函数(数据) { 如果(data.stsAkn==“0”){ $('#r1cian').prop('checked',true) $('#tgl').datepicker('update',''); $(“#tglan”).hide(); }else if(data.stsAkn==“1”){ $('#r2cian').prop('checked',t

在模式引导4上选择单选按钮时,我无法清空日期范围

这是HTML的代码:


卡南岛
正常的
反常的
日期范围
到
这是代码Ajax/JS:

成功:函数(数据)
{
如果(data.stsAkn==“0”){
$('#r1cian').prop('checked',true)
$('#tgl').datepicker('update','');
$(“#tglan”).hide();
}else if(data.stsAkn==“1”){
$('#r2cian').prop('checked',true)
$(“#tglan”).show();
$('[name=“tglscian”]').val(data.stglAkn);
$('[name=“tglecian”]').val(data.etglAkn);
} 
}
我试过了

  • $('#tgl')。日期选择器('update','')
  • $('[name=“tglscian”]')。日期选择器('update',''
  • $('[name=“tglecian”]')。日期选择器('update','')
  • $('#tgl').val('')
  • 但仍然不能清空日期, 这个问题的解决方案是什么

    我使用引导日期选择器

    try$('[name=“tglscian”]').datepicker('setDate',null)@Saeed我试过$('[name=“tglscian”]')。日期选择器('setDate',null);和$('#tgl').datepicker('setDate',null);但仍然不起作用还有另一个解决方案吗?你有在线演示吗?我没有@Saeed我该怎么做才能解决这个问题?也试试这个$(“#tgl”).datepicker()$('tgl').val('');