Bladeren bron

전시일시 체크

bin2107 4 jaren geleden
bovenliggende
commit
b05d2b4da4
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      src/main/webapp/WEB-INF/views/display/MainMultiContentsPopupForm.html

+ 5 - 1
src/main/webapp/WEB-INF/views/display/MainMultiContentsPopupForm.html

@@ -709,6 +709,7 @@ console.log('brandGroupNo:'+brandGroupNo);
 	// 전시 일시 체크
 	function dateValidation(){
 		var dateBool = true;
+		let dupCnt = 0;
 		$(".tableTest").each(function(i){
 			var dispStdt = $(this).find("[name=dispStdt]").val().replace(/[^0-9]/g, '') + "" +$(this).find("[name=stTimeHour]").val().replace('시', '') + "" +$(this).find("[name=stTimeMin]").val().replace('분', '') + "00";
 			var dispEddt = $(this).find("[name=dispEddt]").val().replace(/[^0-9]/g, '') + "" +$(this).find("[name=edTimeHour]").val().replace('시', '') + "" +$(this).find("[name=edTimeMin]").val().replace('분', '') + "59";
@@ -719,6 +720,7 @@ console.log('brandGroupNo:'+brandGroupNo);
 				mcxDialog.alert("시작일자는 종료일자 보다 클 수 없습니다.");
 				$(this).find('input[name=dispStdt]').focus();
 				// dateBool = false;
+				dupCnt++;
 				return false;
 			}
 		});
@@ -727,7 +729,9 @@ console.log('brandGroupNo:'+brandGroupNo);
 		// }else{
 		// 	return true;
 		// }
-		return true;
+		if(dupCnt==0){
+			return true;
+		}
 	}
 
 	// 몰메인 신상품 : 상품데이터 체크