0
$(document).ready(function(){
$('#data_nasterii').datepicker($.datepicker.regional['ro']); // romanian language
$('#data_nasterii').datepicker('option', 'changeMonth', true); // dropdown with month
$('#data_nasterii').datepicker('option', 'changeYear', true); // dropdown with year
$('#data_nasterii').datepicker('option', 'yearRange', '1900:2020'); // selectable years
$('#data_nasterii').datepicker('option', 'dateFormat', 'yy-mm-dd'); // date format(ex: 1981-07-25)
});
...
// creating date field with php
echo "<td><div align=\"left\"><input name=\"data_nasterii\" type=\"text\" id=\"data_nasterii\" value=\"".$row['data_nasterii']."\" size=\"10\" maxlength=\"10\" /></div></td></tr>";
後,如果我打「清除表單」字段得到正確的值默認jQuery的日期值編輯表格,頁面加載
預先感謝您的jQuery設置當前日期場!