我将 jQuery UI 用于 datepicker 我想在字段中显示当前日期作为默认值以下是我的代码请帮助
<script>
$(function() {
$( "#datepicker" ).datepicker({
dateFormat: 'dd-mm-yy',
currentText: "Now"
});
$( "#datepicker2" ).datepicker({
dateFormat: 'dd-mm-yy',
currentText: "Now"
});
});
</script>
From Date: <input type='text' id='datepicker' name='date_from' />
To Date: <input type='text' id='datepicker2' name='date_to' />
但我无法设置默认日期