Bläddra i källkod

공통 날짜선택 함수수정

isna 2 år sedan
förälder
incheckning
32b1a19ffd
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      src/main/webapp/js/app/config.js

+ 4 - 0
src/main/webapp/js/app/config.js

@@ -1184,7 +1184,9 @@ function itp_fn_get_today_ko(split) {
1184 1184
 };
1185 1185
 
1186 1186
 function itp_fn_get_before_month(dateStr, addMonth, split) {
1187
+	if (!addMonth) addMonth=1;
1187 1188
 	if (split == null || split == undefined) split = '.';
1189
+	if (dateStr == null || dateStr == undefined) dateStr = itp_fn_get_today_ko();
1188 1190
 	dateStr = itp_fn_delete_date_format(dateStr);
1189 1191
 	var yyyy = dateStr.substring(0,4),
1190 1192
 		mm = parseInt(dateStr.substring(4,6), 10),
@@ -1200,7 +1202,9 @@ function itp_fn_get_before_month(dateStr, addMonth, split) {
1200 1202
 };
1201 1203
 
1202 1204
 function itp_fn_get_after_month(dateStr, addMonth, split) {
1205
+	if (!addMonth) addMonth=1;
1203 1206
 	if (split == null || split == undefined) split = '.';
1207
+	if (dateStr == null || dateStr == undefined) dateStr = itp_fn_get_today_ko();
1204 1208
 	dateStr = itp_fn_delete_date_format(dateStr);
1205 1209
 	var yyyy = dateStr.substring(0,4),
1206 1210
 		mm = parseInt(dateStr.substring(4,6), 10),