Index: trunk/extensions/SemanticFormsInputs/libs/datepicker.js |
— | — | @@ -114,6 +114,15 @@ |
115 | 115 | input.attr( "value", params.currValue ); |
116 | 116 | jQuery( "#" + input_id.replace( "_dp_show", "" )).attr( "value", params.currValue ); |
117 | 117 | } |
| 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 | + }); |
118 | 127 | } |
119 | 128 | } |
120 | 129 | |