📜  如何在数据表中的两个日期之间添加集合 - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:13.933000             🧑  作者: Mango

代码示例2
Javascript12345678910111213141516171819202122232425$(function() {  $( "#from" ).datepicker({    defaultDate: "+1w",    changeMonth: true,    numberOfMonths: 3,    onClose: function( selectedDate ) {      $( "#to" ).datepicker( "option", "minDate", selectedDate );    }  });  $( "#to" ).datepicker({    defaultDate: "+1w",    changeMonth: true,    numberOfMonths: 3,    onClose: function( selectedDate ) {      $( "#from" ).datepicker( "option", "maxDate", selectedDate );    }  });});$(document).ready( function () {  var table = $('#myTable').dataTable( { "aoColumnDefs": [ {"bSortable": false, "aTargets": [ 0, 1, 2, 5 ] } ],  "aaSorting": [] } );  $.fn.dataTable.moment('MMMM D YYYY HH:mm');  $('select#positions').change( function() { table.fnFilter( $(this).val() ); } );  $('#from').keyup( function() { table.draw(); } );  $('#to').keyup( function() { table.draw(); } );} );