r80831 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80830‎ | r80831 | r80832 >
Date:20:02, 23 January 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix: datepicker now sends back an empty value when user input is empty
Modified paths:
  • /trunk/extensions/SemanticFormsInputs/libs/datepicker.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticFormsInputs/libs/datepicker.js
@@ -114,6 +114,15 @@
115115 input.attr( "value", params.currValue );
116116 jQuery( "#" + input_id.replace( "_dp_show", "" )).attr( "value", params.currValue );
117117 }
 118+
 119+ // delete date when user deletes input field
 120+ input.change(function() {
 121+
 122+ if ( this.value == "" ) {
 123+ input.datepicker( "setDate", null );
 124+ }
 125+
 126+ });
118127 }
119128 }
120129