diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03010-main.jsp index 0f9df54d..22165467 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03010-main.jsp @@ -35,7 +35,8 @@ "/> " /> - " /> + + " /> diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03020-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03020-main.jsp index 60acb89d..58be2697 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03020-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt03020-main.jsp @@ -35,7 +35,7 @@ "/> " /> - " /> + " /> ?${ver}" /> diff --git a/src/main/webapp/WEB-INF/jsp/fims/user/user-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/user/user-info.jsp index 266f5a3e..e1fbdc22 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/user/user-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/user/user-info.jsp @@ -28,7 +28,8 @@ - + +" /> 사용자정보 diff --git a/src/main/webapp/WEB-INF/jsp/include/head.jsp b/src/main/webapp/WEB-INF/jsp/include/head.jsp index b952bd2e..c88c3930 100644 --- a/src/main/webapp/WEB-INF/jsp/include/head.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/head.jsp @@ -37,7 +37,7 @@ "/> " /> - " /> + " /> diff --git a/src/main/webapp/WEB-INF/jsp/include/tail.jsp b/src/main/webapp/WEB-INF/jsp/include/tail.jsp index d666e7a4..9fa984eb 100644 --- a/src/main/webapp/WEB-INF/jsp/include/tail.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/tail.jsp @@ -10,12 +10,13 @@ - - + + + @@ -26,6 +27,7 @@ + @@ -40,14 +42,15 @@ + + - - + diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp index 67de7a48..a8aee4e8 100644 --- a/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -36,7 +36,8 @@ "/> " /> - " /> + + " /> diff --git a/src/main/webapp/resources/3rd-party/bootstrap-datepicker/bootstrap-datepicker-support.js b/src/main/webapp/resources/3rd-party/bootstrap-datepicker/bootstrap-datepicker-support.js new file mode 100644 index 00000000..7e236c0c --- /dev/null +++ b/src/main/webapp/resources/3rd-party/bootstrap-datepicker/bootstrap-datepicker-support.js @@ -0,0 +1,80 @@ +$.fn.datepicker.makeTemplate = function(){ + this.DPGlobal.template = '
'+ + '
'+ + ''+ + this.DPGlobal.headTemplate+ + ''+ + this.DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + this.DPGlobal.headTemplate+ + this.DPGlobal.contTemplate+ + this.DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + this.DPGlobal.headTemplate+ + this.DPGlobal.contTemplate+ + this.DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + this.DPGlobal.headTemplate+ + this.DPGlobal.contTemplate+ + this.DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + this.DPGlobal.headTemplate+ + this.DPGlobal.contTemplate+ + this.DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'; +}; + +$.fn.datepicker.addKo = function(){ + + this.dates['ko'] = { + days: ["일","월","화","수","목","금","토"], + daysShort: ["일","월","화","수","목","금","토"], + daysMin: ["일","월","화","수","목","금","토"], + months: ["1월","2월","3월","4월","5월","6월", "7월","8월","9월","10월","11월","12월"], + monthsShort: ["1월","2월","3월","4월","5월","6월", "7월","8월","9월","10월","11월","12월"], + today: "오늘", + clear: "지우기", + titleFormat: "yyyy년 MM" + }; + + this.defaults.language = 'ko'; + this.defaults.rtl = false; + this.defaults.format = 'yyyy-mm-dd'; + + this.defaults.autoclose = true; + this.defaults.clearBtn = true; + this.defaults.todayBtn = 'linked'; + this.defaults.keyboardNavigation = false; + this.defaults.maxViewMode = 2; + this.defaults.todayHighlight = true; + this.defaults.weekStart = 0; + this.defaults.disableTouchKeyboard = true; + this.defaults.enableOnReadonly = false; + this.defaults.immediateUpdates = true; + + this.DPGlobal.footTemplate = ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''; + this.makeTemplate(); +} + +$.fn.datepicker.addKo(); \ No newline at end of file diff --git a/src/main/webapp/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.js b/src/main/webapp/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.js index a7b38bc5..1899fa2c 100644 --- a/src/main/webapp/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.js +++ b/src/main/webapp/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.js @@ -1746,7 +1746,7 @@ leftArrow: '«', rightArrow: '»' }, - showWeekDays: true + showWeekDays: true }; var locale_opts = $.fn.datepicker.locale_opts = [ 'format', diff --git a/src/main/webapp/resources/html/fileUpload.html b/src/main/webapp/resources/html/fileUpload.html index 40014320..b22a3ac4 100644 --- a/src/main/webapp/resources/html/fileUpload.html +++ b/src/main/webapp/resources/html/fileUpload.html @@ -29,7 +29,7 @@ - + diff --git a/src/main/webapp/resources/html/inputDateDialog.html b/src/main/webapp/resources/html/inputDateDialog.html index 0ff0a0b6..48a58184 100644 --- a/src/main/webapp/resources/html/inputDateDialog.html +++ b/src/main/webapp/resources/html/inputDateDialog.html @@ -22,7 +22,7 @@ - + 일자선택 @@ -81,7 +81,7 @@ - + diff --git a/src/main/webapp/resources/html/inputTtlDocNoDialog.html b/src/main/webapp/resources/html/inputTtlDocNoDialog.html index cba008cb..85253a0a 100644 --- a/src/main/webapp/resources/html/inputTtlDocNoDialog.html +++ b/src/main/webapp/resources/html/inputTtlDocNoDialog.html @@ -21,7 +21,7 @@ - + 공시송달 입력 @@ -85,7 +85,7 @@ - + diff --git a/src/main/webapp/resources/html/pdf.html b/src/main/webapp/resources/html/pdf.html index 45e5610b..26c6521d 100644 --- a/src/main/webapp/resources/html/pdf.html +++ b/src/main/webapp/resources/html/pdf.html @@ -26,7 +26,7 @@ - + 샘플 보기 diff --git a/src/main/webapp/resources/html/searchAddr.html b/src/main/webapp/resources/html/searchAddr.html index ce031d34..bf6cab37 100644 --- a/src/main/webapp/resources/html/searchAddr.html +++ b/src/main/webapp/resources/html/searchAddr.html @@ -26,7 +26,7 @@ - + 주소검색 diff --git a/src/main/webapp/resources/js/base/base-fims.js b/src/main/webapp/resources/js/base/base-fims.js index 039a9db6..39dd001f 100644 --- a/src/main/webapp/resources/js/base/base-fims.js +++ b/src/main/webapp/resources/js/base/base-fims.js @@ -312,7 +312,7 @@ function getCellDefs($th, $td){ **************************************************************************/ $.fn.set = function(value) { return this.each(function(){ - if($(this).hasClass('hasDatepicker') && $(this).hasClass('form-date')){ + if($(this).hasClass('form-date')){ if(value != null && value.length == 8 && value.indexOf("-") == -1){ value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6,8); } @@ -399,8 +399,11 @@ class FimsFormFields extends FormFields { } } if(input.name){ - - input.value = value; + if($(input).hasClass('form-date')){ + $(input).datepicker("setDate", value); + } else { + input.value = value; + } //보안모드 마스킹 항목 if(input.tagName === 'INPUT' && input.id && input.classList.contains("privacy")){ diff --git a/src/main/webapp/resources/js/fims/framework/cmm/initAfterPageLoad.js b/src/main/webapp/resources/js/fims/framework/cmm/initAfterPageLoad.js index 66d1c3d9..9ae8e1e5 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/initAfterPageLoad.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/initAfterPageLoad.js @@ -3,26 +3,35 @@ 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'); - } + executionArea.find(".form-date").datepicker() + .attr("maxlength", "10") + .on("input",function(e){ + + if(this.value.length <= 0){ + return; + } + if(this.value.length != this.selectionStart){ + return; + } - $(this).datepicker("setDate", result); + var value = this.value.replaceAll("-",""); + + if(value.length > 7){ + this.value = value.substring(0,4)+"-"+value.substring(4,6)+"-"+value.substring(6); + } else if(value.length > 5){ + this.value = value.substring(0,4)+"-"+value.substring(4); } - }); + + }) + .on("paste", function(e){ + + var value = e.originalEvent.clipboardData.getData('text'); + if(value.length == 8){ + this.value = value.substring(0,4)+"-"+value.substring(4,6)+"-"+value.substring(6); + } + + }) + ; executionArea.find(".form-date").next("button.bx-calendar").on("click", function() { $(this).prev().focus(); diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/datepicker.css b/src/main/webapp/resources/lib/fims/framework/datepicker/datepicker.css deleted file mode 100644 index eb63f7f7..00000000 --- a/src/main/webapp/resources/lib/fims/framework/datepicker/datepicker.css +++ /dev/null @@ -1,47 +0,0 @@ -/* 해당 #3f51b5 색상코드 변경 시 디자인 일괄적용 */ - - -/* datepicker Style */ -.ui-datepicker { width: 270px; padding: 0; display: none; border: 0; margin-top: 10px;} -.ui-widget.ui-widget-content { border: 0; border-radius: 3px; overflow: hidden; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,0.3) } -.ui-datepicker .ui-widget-header { position: relative; padding: 6px 0 36px 0; border: 0; background: #3f51b5; color: #fff; border-radius: 0; } -.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 70px; height: 26px; line-height: 26px; background: rgba(0,0,0,0.15) url(images/arrow-button.png) 100% -27px no-repeat; margin: 0 4px; padding: 0 6px; border: 0; border-radius: 3px; color: #fff; font-size: 13px; font-weight: bold; box-sizing: border-box; -webkit-appearance: none; -moz-appearance: none; appearance: none; /* 화살표 없애기 */ } -.ui-datepicker select.ui-datepicker-month:hover, .ui-datepicker select.ui-datepicker-year:hover { background: rgba(0,0,0,0.3) url(images/arrow-button.png) 100% -27px no-repeat; } -.ui-datepicker select::-ms-expand { -display: none; /* 화살표 없애기 for IE10, 11*/ -} -.ui-datepicker .ui-datepicker-title { line-height: 1.8em; text-align: center; margin: 0px 2.3em; font-size:13px; font-weight:bold; letter-spacing:0; } -.ui-datepicker-title .ui-datepicker-year option, .ui-datepicker-title .ui-datepicker-month option { background: #fff; color: #333; } -.ui-datepicker-title .ui-datepicker-year { } -.ui-datepicker-title .ui-datepicker-month { } -.ui-datepicker .ui-datepicker-calendar { position: relative; width: 260px; padding-top: 100px; margin: 0 auto; } -.ui-datepicker-calendar thead tr { position: absolute; top: -24px; left: 5px; right: 5px; } -.ui-datepicker-calendar thead th { float: left; display: block; padding: 0; width: 14.2857%; color: #fff; font-size:11px; letter-spacing:1px; opacity: 0.6 } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position: absolute; top: 5px; width: 1.8em; height: 1.8em; text-indent: -9999px; cursor: pointer } -.ui-datepicker .ui-datepicker-prev { left: 5px; } -.ui-datepicker .ui-datepicker-prev.ui-state-hover { background: rgba(0,0,0,0.1); border: 0; } -.ui-datepicker .ui-datepicker-prev .ui-icon { background: url(images/arrow-button.png) 0 0 no-repeat; } -.ui-datepicker .ui-datepicker-next { right: 5px; } -.ui-datepicker .ui-datepicker-next.ui-state-hover { background: rgba(0,0,0,0.1); border: 0; } -.ui-datepicker .ui-datepicker-next .ui-icon { background: url(images/arrow-button.png) -16px 0 no-repeat; } -.ui-datepicker .ui-state-default { display: block; border: 0; border-radius: 15px; width: 30px; height: 30px; line-height: 30px; padding: 0; margin: 4px auto; font-size: 12px; text-align: center; background: #fff; font-weight: normal; color: #333; box-sizing: border-box; } -.ui-datepicker .ui-state-default.ui-state-hover { background: rgba(0,0,0,0.05); } -.ui-datepicker-today .ui-state-default { color: #3f51b5; font-weight: bold; } -.ui-datepicker-current-day .ui-state-default { background: #3f51b5 !important; color: #fff; font-weight: bold; } -.ui-datepicker-buttonpane { overflow: hidden; border-top: 1px solid #eee; } -.ui-datepicker-buttonpane button[data-handler="today"] { color: #3f51b5; opacity: 0.75; } -.ui-datepicker-buttonpane button[data-handler="hide"] { } - -/* ie add Style */ -.ui-datepicker td, .ui-datepicker th { border: 0 } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; cursor: pointer; width: auto; margin: 0.5em 0.2em 0.4em; padding: 0.2em 0.6em 0.3em; overflow: visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float: left; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-clear { float: left; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-corner-all { border-radius: 3px; } -.ui-icon { display: block; width: 16px; height: 16px; } - -/* mobile Responsive */ - @media screen and (max-width:480px) { -.ui-datepicker { width: 270px !important; left: 50% !important; margin-left: -135px !important; } -} diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/datepicker.js b/src/main/webapp/resources/lib/fims/framework/datepicker/datepicker.js deleted file mode 100644 index dc050aae..00000000 --- a/src/main/webapp/resources/lib/fims/framework/datepicker/datepicker.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * datepicker 설정 - */ -$.datepicker.regional["ko"] = { - dateFormat: 'yy-mm-dd', - prevText: '이전달', - nextText: '다음달', - currentText: '오늘', - closeText: '닫기', - monthNames: ["1월(JAN)","2월(FEB)","3월(MAR)","4월(APR)","5월(MAY)","6월(JUN)", "7월(JUL)","8월(AUG)","9월(SEP)","10월(OCT)","11월(NOV)","12월(DEC)"], - monthNamesShort: ["1월","2월","3월","4월","5월","6월", "7월","8월","9월","10월","11월","12월"], - dayNames: ["일","월","화","수","목","금","토"], - dayNamesShort: ["일","월","화","수","목","금","토"], - dayNamesMin: ["일","월","화","수","목","금","토"], - changeMonth: true, // month 셀렉트박스 사용 - changeYear: true, // year 셀렉트박스 사용 - weekHeader: "Wk", - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: "" -}; -$.datepicker.setDefaults($.datepicker.regional["ko"]); diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/arrow-button.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/arrow-button.png deleted file mode 100644 index eddaaf27..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/arrow-button.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_444444_256x240.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_444444_256x240.png deleted file mode 100644 index 19f664d9..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_444444_256x240.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_555555_256x240.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_555555_256x240.png deleted file mode 100644 index e965f6d9..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_555555_256x240.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_777620_256x240.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_777620_256x240.png deleted file mode 100644 index 9785948a..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_777620_256x240.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_777777_256x240.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_777777_256x240.png deleted file mode 100644 index 323c4564..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_777777_256x240.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_cc0000_256x240.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_cc0000_256x240.png deleted file mode 100644 index 45ac7787..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_cc0000_256x240.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_ffffff_256x240.png b/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index fe41d2d0..00000000 Binary files a/src/main/webapp/resources/lib/fims/framework/datepicker/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/src/main/webapp/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js b/src/main/webapp/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js index 88b2847e..8d6aa5db 100644 --- a/src/main/webapp/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js +++ b/src/main/webapp/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js @@ -2,7 +2,6 @@ * http://jqueryui.com * Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, * widgets/draggable.js, widgets/resizable.js, widgets/mouse, -* widgets/datepicker.js, * effect.js, effects/effect-highlight.js * Copyright jQuery Foundation and other contributors; Licensed MIT */ @@ -4465,2245 +4464,6 @@ var widgetsResizable = $.ui.resizable; -/* eslint-disable max-len, camelcase */ -/*! - * jQuery UI Datepicker 1.13.2 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Datepicker -//>>group: Widgets -//>>description: Displays a calendar from an input or inline for selecting dates. -//>>docs: http://api.jqueryui.com/datepicker/ -//>>demos: http://jqueryui.com/datepicker/ -//>>css.structure: ../../themes/base/core.css -//>>css.structure: ../../themes/base/datepicker.css -//>>css.theme: ../../themes/base/theme.css - - -$.extend( $.ui, { datepicker: { version: "1.13.2" } } ); - -var datepicker_instActive; - -function datepicker_getZindex( elem ) { - var position, value; - while ( elem.length && elem[ 0 ] !== document ) { - - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
- value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - - return 0; -} - -/* Date picker manager. - Use the singleton instance of this class, $.datepicker, to interact with the date picker. - Settings for (groups of) date pickers are maintained in an instance object, - allowing multiple different settings on the same page. */ - -function Datepicker() { - this._curInst = null; // The current instance in use - this._keyEvent = false; // If the last event was a key event - this._disabledInputs = []; // List of date picker inputs that have been disabled - this._datepickerShowing = false; // True if the popup picker is showing , false if not - this._inDialog = false; // True if showing within a "dialog", false if not - this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division - this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class - this._appendClass = "ui-datepicker-append"; // The name of the append marker class - this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class - this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class - this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class - this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class - this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class - this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class - this.regional = []; // Available regional settings, indexed by language code - this.regional[ "" ] = { // Default regional settings - closeText: "Done", // Display text for close link - prevText: "Prev", // Display text for previous month link - nextText: "Next", // Display text for next month link - currentText: "Today", // Display text for current month link - monthNames: [ "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting - monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting - dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting - dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting - dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday - weekHeader: "Wk", // Column header for week of the year - dateFormat: "mm/dd/yy", // See format options on parseDate - firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... - isRTL: false, // True if right-to-left language, false if left-to-right - showMonthAfterYear: false, // True if the year select precedes month, false for month then year - yearSuffix: "", // Additional text to append to the year in the month headers, - selectMonthLabel: "Select month", // Invisible label for month selector - selectYearLabel: "Select year" // Invisible label for year selector - }; - this._defaults = { // Global defaults for all the date picker instances - showOn: "focus", // "focus" for popup on focus, - // "button" for trigger button, or "both" for either - showAnim: "fadeIn", // Name of jQuery animation for popup - showOptions: {}, // Options for enhanced animations - defaultDate: null, // Used when field is blank: actual date, - // +/-number for offset from today, null for today - appendText: "", // Display text following the input box, e.g. showing the format - buttonText: "...", // Text for trigger button - buttonImage: "", // URL for trigger button image - buttonImageOnly: false, // True if the image appears alone, false if it appears on a button - hideIfNoPrevNext: false, // True to hide next/previous month links - // if not applicable, false to just disable them - navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links - gotoCurrent: false, // True if today link goes back to current selection instead - changeMonth: false, // True if month can be selected directly, false if only prev/next - changeYear: false, // True if year can be selected directly, false if only prev/next - yearRange: "c-10:c+10", // Range of years to display in drop-down, - // either relative to today's year (-nn:+nn), relative to currently displayed year - // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) - showOtherMonths: false, // True to show dates in other months, false to leave blank - selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable - showWeek: false, // True to show week of the year, false to not show it - calculateWeek: this.iso8601Week, // How to calculate the week of the year, - // takes a Date and returns the number of the week for it - shortYearCutoff: "+10", // Short year values < this are in the current century, - // > this are in the previous century, - // string value starting with "+" for current year + value - minDate: null, // The earliest selectable date, or null for no limit - maxDate: null, // The latest selectable date, or null for no limit - duration: "fast", // Duration of display/closure - beforeShowDay: null, // Function that takes a date and returns an array with - // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", - // [2] = cell title (optional), e.g. $.datepicker.noWeekends - beforeShow: null, // Function that takes an input field and - // returns a set of custom settings for the date picker - onSelect: null, // Define a callback function when a date is selected - onChangeMonthYear: null, // Define a callback function when the month or year is changed - onClose: null, // Define a callback function when the datepicker is closed - onUpdateDatepicker: null, // Define a callback function when the datepicker is updated - numberOfMonths: 1, // Number of months to show at a time - showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) - stepMonths: 1, // Number of months to step back/forward - stepBigMonths: 12, // Number of months to step back/forward for the big links - altField: "", // Selector for an alternate field to store selected dates into - altFormat: "", // The date format to use for the alternate field - constrainInput: true, // The input is constrained by the current date format - showButtonPanel: false, // True to show button panel, false to not show it - autoSize: false, // True to size the input for the date format, false to leave as is - disabled: false // The initial disabled state - }; - $.extend( this._defaults, this.regional[ "" ] ); - this.regional.en = $.extend( true, {}, this.regional[ "" ] ); - this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); - this.dpDiv = datepicker_bindHover( $( "
" ) ); -} - -$.extend( Datepicker.prototype, { - - /* Class name added to elements to indicate already configured with a date picker. */ - markerClassName: "hasDatepicker", - - //Keep track of the maximum number of rows displayed (see #7043) - maxRows: 4, - - // TODO rename to "widget" when switching to widget factory - _widgetDatepicker: function() { - return this.dpDiv; - }, - - /* Override the default settings for all instances of the date picker. - * @param settings object - the new settings to use as defaults (anonymous object) - * @return the manager object - */ - setDefaults: function( settings ) { - datepicker_extendRemove( this._defaults, settings || {} ); - return this; - }, - - /* Attach the date picker to a jQuery selection. - * @param target element - the target input field or division or span - * @param settings object - the new settings to use for this date picker instance (anonymous) - */ - _attachDatepicker: function( target, settings ) { - var nodeName, inline, inst; - nodeName = target.nodeName.toLowerCase(); - inline = ( nodeName === "div" || nodeName === "span" ); - if ( !target.id ) { - this.uuid += 1; - target.id = "dp" + this.uuid; - } - inst = this._newInst( $( target ), inline ); - inst.settings = $.extend( {}, settings || {} ); - if ( nodeName === "input" ) { - this._connectDatepicker( target, inst ); - } else if ( inline ) { - this._inlineDatepicker( target, inst ); - } - }, - - /* Create a new instance object. */ - _newInst: function( target, inline ) { - var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars - return { id: id, input: target, // associated target - selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection - drawMonth: 0, drawYear: 0, // month being drawn - inline: inline, // is datepicker inline or not - dpDiv: ( !inline ? this.dpDiv : // presentation div - datepicker_bindHover( $( "
" ) ) ) }; - }, - - /* Attach the date picker to an input field. */ - _connectDatepicker: function( target, inst ) { - var input = $( target ); - inst.append = $( [] ); - inst.trigger = $( [] ); - if ( input.hasClass( this.markerClassName ) ) { - return; - } - this._attachments( input, inst ); - input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ). - on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp ); - this._autoSize( inst ); - $.data( target, "datepicker", inst ); - - //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) - if ( inst.settings.disabled ) { - this._disableDatepicker( target ); - } - }, - - /* Make attachments based on settings. */ - _attachments: function( input, inst ) { - var showOn, buttonText, buttonImage, - appendText = this._get( inst, "appendText" ), - isRTL = this._get( inst, "isRTL" ); - - if ( inst.append ) { - inst.append.remove(); - } - if ( appendText ) { - inst.append = $( "" ) - .addClass( this._appendClass ) - .text( appendText ); - input[ isRTL ? "before" : "after" ]( inst.append ); - } - - input.off( "focus", this._showDatepicker ); - - if ( inst.trigger ) { - inst.trigger.remove(); - } - - showOn = this._get( inst, "showOn" ); - if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field - input.on( "focus", this._showDatepicker ); - } - if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked - buttonText = this._get( inst, "buttonText" ); - buttonImage = this._get( inst, "buttonImage" ); - - if ( this._get( inst, "buttonImageOnly" ) ) { - inst.trigger = $( "" ) - .addClass( this._triggerClass ) - .attr( { - src: buttonImage, - alt: buttonText, - title: buttonText - } ); - } else { - inst.trigger = $( "