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
원만한 가정은 상호간의 희생 없이는 절대 영위(營爲)되지 못한다. 이 희생은 그것을 실행하는 사람을 위대하게 하며 아름답게 한다. (앙드레 지드)