From bd482c6881a1f23c265bd282b7367b27dd954694 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Thu, 14 Apr 2016 19:30:52 +0900 Subject: [PATCH] Fix datepicker date-format as yy-mm-dd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XE에서 한국어 언어 파일을 이용해서 사실상 yy-mm-dd 만을 날짜 형식으로 사용했기 때문에, 다국어를 지원하면서 나라마다 다른 형식을 풀어주게 되면, 호환성 문제가 있을 수 있어서 형식을 강제함. --- common/js/plugins/ui/rx_datepicker.js | 8 +++++++- modules/editor/components/poll_maker/tpl/popup.html | 7 +++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/js/plugins/ui/rx_datepicker.js b/common/js/plugins/ui/rx_datepicker.js index 8c9c4d455..6673acea1 100644 --- a/common/js/plugins/ui/rx_datepicker.js +++ b/common/js/plugins/ui/rx_datepicker.js @@ -3,5 +3,11 @@ * @author MinSoo Kim **/ if(typeof current_lang !== "undefined" && current_lang !== 'en') { - jQuery.getScript(request_uri + "./common/js/plugins/ui/i18n/datepicker-"+ current_lang.replace("jp", "ja") +".js"); + jQuery.getScript(request_uri + "./common/js/plugins/ui/i18n/datepicker-"+ current_lang.replace("jp", "ja") +".js", function() { + var default_option = { + dateFormat:'yy-mm-dd' + }; + jQuery.extend(jQuery.datepicker.regional[current_lang.replace("jp", "ja")],default_option); + jQuery.datepicker.setDefaults( datepicker.regional[current_lang.replace("jp", "ja")] ); + }); } \ No newline at end of file diff --git a/modules/editor/components/poll_maker/tpl/popup.html b/modules/editor/components/poll_maker/tpl/popup.html index 662befbf1..b3ccc9b2d 100644 --- a/modules/editor/components/poll_maker/tpl/popup.html +++ b/modules/editor/components/poll_maker/tpl/popup.html @@ -20,7 +20,7 @@
- +