我正在使用Keith Wood的Datepick http://keith-wood.name/datepick.html,我想从输入字段中删除当前选择的日期。我怎样才能实现它?
我正在使用以下代码 -
function onload(){
$jQ("#"+id).datepick({
dateFormat: 'mm/dd/yyyy',
onShow: function() {maxValueLimit(countId);}
});
}
function maxValueLimit(id){
var maxValuesPerKeyPerNetwork = 20;
var uiValueArr= new Array();
var dates = $jQ("#datePicker_" + counterId).datepick('getDate');
for (var ii = 0; ii < dates.length; ii++) {
uiValueArr[uiValueArr.length] = $jQ.datepick.formatDate(dates[ii]);;
}
if(uiValueArr.length > maxValuesPerKeyPerNetwork){
alert("You have already reached the limit of values assigned to this key.");
}
}
答案 0 :(得分:0)
我认为删除insense,空值正确。然后试试这个
$('.datepicker').val('');