티스토리 툴바


JQUERY2012/02/02 16:04
 <%-- 달력용 CSS --%>
 <link href="/html/js/jquery-ui-1.8.custom/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css" />
 <%-- 달력용 JS --%>
 <script type="text/javascript" src="/html/js/jquery-ui-1.8.custom/jquery-ui-1.8.14.custom.min.js"></script>
$(fuction(){
  $('input').filter(function(){return this.id.match(/startDt)/);}).datepicker({
       dateFormat : "yy-mm-dd", // 해당 날짜를 선택했을 때, textbox에 들어가는 날짜의 포맷
       showOn : "button",
       buttonImageOnly : true,
       buttonImage : "<c:url value='/html/img/btn/btn06_clnt.gif'/>",
       buttonText : "달력"
  });
});

/*특정조건일 때 달력이 보이지 않게 할 때*/
$('input').filter(function(){return this.id.match(/startDt)/);}).datepicker("disable");


<input type="text" id="startDt" name="startDt" value="" />
Posted by darkhorizon