function initDatepicker(elementId){
	
	var executionArea = $("#"+elementId);

    /*---------------------  달력 제어  ---------------------*/
    executionArea.find(".form-date").datepicker({
        changeMonth: true,
        changeYear: true,
        showButtonPanel: true,
		onChangeMonthYear : function(year, month, inst){
			
			/** 기능 추가 : 연월 변경시 일 선택 */
			
			var result = "" + year + "-"+(""+month).padStart(2,'0') + "-";
			
			var endDay = DateUtil.getEndOfMonthDay(year, month);
			if(inst.selectedDay > endDay){
				result += (""+endDay).padStart(2,'0');
			} else {
				result += (""+inst.selectedDay).padStart(2,'0');
			}

			$(this).datepicker("setDate", result);
		}
    });

    executionArea.find(".form-date").next("button.bx-calendar").on("click", function() {
        $(this).prev().focus();
    });

}

function initDetailSearchButton(elementId){
	
	var executionArea = $("#"+elementId);
	
	/*--------------------- 상세검색 버튼 제어  ---------------------*/
    executionArea.find(".btn-open-detail").on("click", function() {
        $(this).find('i').toggleClass('bx-chevron-down');
        $(this).find('i').toggleClass('bx-chevron-up');
    });

}