2014-01-29 2 views
0

Jquery Datepicker에서 값을 선택 취소하는 방법은 무엇입니까? 다음 코드를 시도했지만 작동하지 않습니다. 다른 생각?Jquery Datepicker에서 값 선택을 취소 하시겠습니까?

if (this.displayClear) { 
     $pop.append(
      $('<a href="#" id="dp-clear">' + $.dpText.TEXT_CLEAR + '</a>') 
      .bind(
       'click', 
       function() 
       { 
         c.clearSelected(); 
         //help! reset the value to '': $(this.something).val('') 
         c._closeCalendar(); 
       } 
      ) 
     ); 
    } 
+1

http://stackoverflow.com/questions/9435086/jquery-ui-datepicker-how-do-i-clear-reset-에서 선택한 값을 취소하려면 백 스페이스를 사용 할 수 있습니다 the-datepicker-calendar –

답변

1

시도해보십시오. 이것은 당신이 JQuery와 날짜 선택기

$("#txtestimatestartdate").datepicker().keyup(function (e) { 
     if (e.keyCode == 8 || e.keyCode == 46) { 
      $.datepicker._clearDate(this); 
     } 
    }); 
관련 문제