aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Etienne2014-04-09 15:07:08 +0200
committerMichel Etienne2014-04-09 15:07:08 +0200
commite9c17d181888c8512c3d559663980124d52c1480 (patch)
treefdfa6b0d5b5a07d9946d95657f817c3735bfbaf9
parent7875ff46eac6c5a2cdf71867b92ade23d307295a (diff)
downloadchouette-core-e9c17d181888c8512c3d559663980124d52c1480.tar.bz2
correct date format on date input fields, Mantis 23913
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/assets/javascripts/plugins/jquery.ui.datepicker-i18n.js6
2 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bb50453e..3fe7f2ff9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
* L'Export CSV sort un message inexploitable sur informations incomplètes (Mantis 24485)
* L'import NeTEx n'importe pas les ITL (Mantis 20889)
* L'ajout de nouvelles dates et périodes d'un calendrier ne propose pas l'assitant de saisie de date (Mantis 24440)
+ * Le format de date n'est pas correct en saisie (Mantis 23913)
# Version 2.3.0 (06/03/14, en cours de qualification)
* Migration technique de chouette (Java)
diff --git a/app/assets/javascripts/plugins/jquery.ui.datepicker-i18n.js b/app/assets/javascripts/plugins/jquery.ui.datepicker-i18n.js
index b7748a77a..ef2bfb631 100644
--- a/app/assets/javascripts/plugins/jquery.ui.datepicker-i18n.js
+++ b/app/assets/javascripts/plugins/jquery.ui.datepicker-i18n.js
@@ -47,7 +47,7 @@ jQuery(function($){
{
$(element).datepicker(
{
- dateFormat: "dd/mm/y",
+ dateFormat: "dd/mm/yy",
dayNamesShort: $.datepicker.regional[ $('html').attr('lang') ].dayNamesShort,
dayNames: $.datepicker.regional[ $('html').attr('lang') ].dayNames,
monthNamesShort: $.datepicker.regional[ $('html').attr('lang') ].monthNamesShort,
@@ -55,7 +55,7 @@ jQuery(function($){
} );
if ($(element).val().indexOf('/') >= 0)
{
- $(element).datepicker("setDate", $.datepicker.parseDate('dd/mm/y', $(element).val() ) );
+ $(element).datepicker("setDate", $.datepicker.parseDate('dd/mm/yy', $(element).val() ) );
}
else
{
@@ -68,7 +68,7 @@ jQuery(function($){
$this.find("input[type='date']").each(
function(index, element)
{
- var date = $.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate('dd/mm/y', $(element).val() ) );
+ var date = $.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate('dd/mm/yy', $(element).val() ) );
$(element).val(date);
}
);