Html & Script

[펌] bootstrap 에서 modal + datepicker 사용시 안보이죠?

페이지 정보

본문

출처 : http://jaweb.tistory.com/505

 

jqueury bootstrap 에서 modal + datepicker 사용시 안보이죠? 

 

써보면 압니다. 안보임 ㅇㅇ

게다가 ajax 로 값 불러오고 datepicker 불러와도 안됩니다.

 

안보이는거 해결은 datepicker 가 속한 div 를 modal 안에 넣어주면 됩니다. (2번째줄)

ajax로 불러온 버튼 클릭시 datepicker 가 불러오지 않는건 호출, show 를 해주면 됩니다. (3~4번째줄)

 


 

 

 
1
2
3
4
5
$('#modalPriceLoad').on('click','#pmaSetDate1,#pmaSetDate2,#pmaShowDate1,#pmaShowDate2',function(){
 $('#ui-datepicker-div').appendTo($('#uploadModal'));
 $(this).datepicker();
 $(this).datepicker("show");
});

 

  

관련자료

등록된 댓글이 없습니다.
Today's proverb
자신이 할 수 있는 모든 것을 하는 것은 인간이 되는 것이요, (나폴레옹)