aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-05-05 05:06:27 +0900
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-05-05 05:06:27 +0900
commita891e81e06c7ce491ae9058aea2fa7fbd51eddb6 (patch)
tree5cd1769047f8e75935a4b818cfea1230dd8ffd46 /tests
parentfd1b4f84feb92b5e0684b3fb66ccc0a57caafaab (diff)
downloadjquery-ui-a891e81e06c7ce491ae9058aea2fa7fbd51eddb6.tar.gz
jquery-ui-a891e81e06c7ce491ae9058aea2fa7fbd51eddb6.zip
Datepicker: Greedy matching in month name. Fixed #7062 - $.datepicker.parseDate does not work for some locale date strings.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/datepicker/datepicker.html1
-rw-r--r--tests/unit/datepicker/datepicker_options.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker.html b/tests/unit/datepicker/datepicker.html
index 76082e780..fa346c6c9 100644
--- a/tests/unit/datepicker/datepicker.html
+++ b/tests/unit/datepicker/datepicker.html
@@ -12,6 +12,7 @@
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="../../../ui/i18n/jquery.ui.datepicker-fr.js"></script>
<script type="text/javascript" src="../../../ui/i18n/jquery.ui.datepicker-he.js"></script>
+ <script type="text/javascript" src="../../../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
<script type="text/javascript" src="../../../external/qunit.js"></script>
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index 4f1e9a164..a10d1ea45 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -827,6 +827,10 @@ test('parseDate', function() {
equalsDate($.datepicker.parseDate('\'jour\' d \'de\' MM (\'\'DD\'\'), yy',
'jour 9 de Avril (\'Lundi\'), 2001', settings), new Date(2001, 4 - 1, 9),
'Parse date \'jour\' d \'de\' MM (\'\'DD\'\'), yy with settings');
+
+ var zh = $.datepicker.regional['zh-CN'];
+ equalsDate($.datepicker.parseDate('yy M d', '2011 十一 22', zh),
+ new Date(2011, 11 - 1, 22), 'Parse date yy M d with zh-CN');
});
test('parseDateErrors', function() {