Преглед изворни кода

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

jmh пре 4 година
родитељ
комит
0af66c2ec4

+ 14 - 1
src/main/webapp/WEB-INF/views/common/fragments/lnb.html

@@ -71,7 +71,14 @@
 				monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
 				monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
 			};
 			};
 			$('.schMonth').monthpicker(options);
 			$('.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) {
 			if ($('#btnSearch').length == 1) {
 				$("#main").find("form:first").on('keyup', function(e) {
 				$("#main").find("form:first").on('keyup', function(e) {
@@ -82,6 +89,12 @@
 					}
 					}
 				})
 				})
 			}
 			}
+			
+			//년-월
+			$(".schBtn").on('click', function () {
+				var thisId= $(this).attr("data-id");
+				$('#'+thisId).monthpicker('show');
+			});
 		});
 		});
 		$(window).scrollTop(0);
 		$(window).scrollTop(0);
 	}
 	}

+ 1 - 1
src/main/webapp/WEB-INF/views/settle/GiftcardSettleForm.html

@@ -45,7 +45,7 @@
 							</select>
 							</select>
 							<span id="spanSettle">
 							<span id="spanSettle">
 								<input type="text" class="schMonth w60" name="settleYm" id="settleYm" maxlength="7"/>
 								<input type="text" class="schMonth w60" name="settleYm" id="settleYm" maxlength="7"/>
-								<button type="button" class="btn icn schBtn" data-id="useYm"><i class="fa fa-calendar" aria-hidden="true"></i></button>
+								<button type="button" class="btn icn schBtn" data-id="settleYm"><i class="fa fa-calendar" aria-hidden="true"></i></button>
 							</span>
 							</span>
 							<span id="terms" style="display: none;">
 							<span id="terms" style="display: none;">
 								<span class="nowrap">
 								<span class="nowrap">