출처1 : http://bootstrap-datepicker.readthedocs.io/en/latest/
출처2 : https://github.com/uxsolutions/bootstrap-datepicker
v1.8
bootstrap-datepicker-master.zip
Bootstrap-Datepicker
맨날 소스는 적용하는데, CSS 파일을 빼먹어서 디자인이 깨진 것만 본다...
js 파일과 css 파일은 같은 버전을 넣어주어야 디자인이 깨지지 않는다.
다음과 같은 방법으로 초기화 및 달력 버튼 눌렀을 때 datepicker를 보이도록 할 수 있다.
$(function() {
// 초기화
$('form .date:not([readonly])').datepicker({
autoclose : true,
todayHighlight: true,
format : "yyyy-mm-dd",
maxViewMode : 3,
});
});
function ShowDatePicker(inputId){
// 특정 버튼 누를 시 datepicker 보이도록
$("#" + inputId).datepicker({
autoclose : true,
todayHighlight: true,
format : "yyyy-mm-dd",
maxViewMode : 3,
}).focus();
}