https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114972
Revision: 114972
Author: foxtrott
Date: 2012-04-19 19:09:47 +0000 (Thu, 19 Apr 2012)
Log Message:
-----------
bugfix (datepicker: date is reset on load)
Modified Paths:
--------------
trunk/extensions/SemanticFormsInputs/libs/datepicker.js
Modified: trunk/extensions/SemanticFormsInputs/libs/datepicker.js
===================================================================
--- trunk/extensions/SemanticFormsInputs/libs/datepicker.js 2012-04-19
19:01:10 UTC (rev 114971)
+++ trunk/extensions/SemanticFormsInputs/libs/datepicker.js 2012-04-19
19:09:47 UTC (rev 114972)
@@ -129,17 +129,6 @@
inputShow.datepicker( 'option', 'highlightedDays',
params.highlightedDays );
}
- if ( re.test( params.currValue ) ) {
- inputShow.datepicker( 'setDate',
jQuery.datepicker.parseDate( 'yy/mm/dd', params.currValue, null ) );
- } else {
-
- inputShow.val( params.currValue );
-
- if (params.partOfDTP) {
- input.val( params.currValue );
- }
- }
-
if ( ! params.partOfDTP ) {
inputShow.datepicker( 'option', 'altField', input );
@@ -157,6 +146,14 @@
}
});
}
+
+ if ( re.test( params.currValue ) ) {
+ inputShow.datepicker( 'setDate',
jQuery.datepicker.parseDate( 'yy/mm/dd', params.currValue, null ) );
+ } else {
+ inputShow.val( params.currValue );
+ input.val( params.currValue );
+ }
+
inputShow.datepicker( 'widget' ).hide();
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs