$( "#startDt,
#endDt" ).datepicker({
dateFormat: 'yy-mm-dd'
, changeMonth: true
, changeYear: true
, nextText: '다음 달'
, prevText: '이전 달'
, showButtonPanel: true
, beforeShow: function (input) {
setTimeout(function() {
var nextYearBtn = $("<button>이후 년</button>");
nextYearBtn.unbind("click").bind("click", function() {
$.datepicker._adjustDate($(input), +1, 'Y');
});
var preYearBtn = $("<button>이전 년</button>");
preYearBtn.unbind("click").bind("click", function() {
$.datepicker._adjustDate($(input), -1, 'Y');
});
$(".ui-datepicker-buttonpane")
.html('')
.append(nextYearBtn)
.append(preYearBtn);
}, 1);
}
, onChangeMonthYear:function(y, m,
i){
setTimeout(function() {
var nextYearBtn = $("<button>이후 년</button>");
nextYearBtn.unbind("click").bind("click", function() {
$.datepicker._adjustDate($(i.input), +1, 'Y');
});
var preYearBtn = $("<button>이전 년</button>");
preYearBtn.unbind("click").bind("click", function() {
$.datepicker._adjustDate($(i.input), -1, 'Y');
});
$(".ui-datepicker-buttonpane")
.html('')
.append(nextYearBtn)
.append(preYearBtn);
}, 1);
}
});//.val(getFormatDate(new
Date())) defaultDate : $(this).val()