0
我的代碼是:停止的jQuery UI的日期選擇器的確認框
HTML,
Date : <input id="datepicker">
Fare : <input id="fare">
JS,
<script>
$(function(){
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
showAnim: 'clip',
dateFormat: "yy-mm-dd"
}).val();
});
$("#datepicker").click(function() {
if (confirm("If you change the Date the Fare fields data will be deleted !!")) {
$('#fare').val('');
} else {
return false;
$("#datepicker").datepicker('destroy');
}
});
<script>
我想,當我取消停止日期選擇器確認框。不幸的是它不工作。請幫助。