Browse Source

은실차장님. 달력 오류수정

jmh 4 years ago
parent
commit
7b03e8b47c
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/main/webapp/WEB-INF/views/common/fragments/lnb.html

+ 13 - 0
src/main/webapp/WEB-INF/views/common/fragments/lnb.html

@@ -72,6 +72,14 @@
 			};
 			$('.schMonth').monthpicker(options);
 
+			// make year selector
+			for (var i = finalYear; i >= startYear; i--) {
+				if (currentYear == i ) {
+					$(".schYear").append("<option value='" + i + "' selected class='ui-state-highlight'>" + i + "</option>");
+				} else {
+					$('.schYear').append("<option value='" + i + "'>" + i + "</option>");
+				}
+			}
 			//조회폼에서 엔터키 입력시 자동조회
 			if ($('#btnSearch').length == 1) {
 				$("#main").find("form:first").on('keyup', function(e) {
@@ -82,6 +90,11 @@
 					}
 				})
 			}
+			//년-월
+			$(".schBtn").on('click', function () {
+				var thisId= $(this).attr("data-id");
+				$('#'+thisId).monthpicker('show');
+			});
 		});
 		$(window).scrollTop(0);
 	}