前提是导入了jqueryUI 和jquery库,粘上以下代码
$( "#id" ).datepicker({ dateFormat: 'yy-mm-dd', showAnim: 'fadeIn', changeMonth: true, changeYear: true });