You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ff...@apache.org on 2012/04/12 17:05:01 UTC

svn commit: r1325305 - /tapestry/tapestry5/branches/5.3/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js

Author: ffacon
Date: Thu Apr 12 15:05:00 2012
New Revision: 1325305

URL: http://svn.apache.org/viewvc?rev=1325305&view=rev
Log:
TAP5-1844 : Datefield value must be validated after change

Modified:
    tapestry/tapestry5/branches/5.3/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js

Modified: tapestry/tapestry5/branches/5.3/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js?rev=1325305&r1=1325304&r2=1325305&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js Thu Apr 12 15:05:00 2012
@@ -114,8 +114,14 @@ Tapestry.DateField = Class.create({
             var date = this.datePicker.getDate();
 
             var resultHandler = function(result) {
-                this.field.value = result;
-
+                 //TAP5-1844
+                if (this.field.value != result) { 
+						this.field.value = result;
+						Tapestry.currentFocusField = this.field;
+						//fire an FOCUS_CHANGE_EVENT event to force inputValidation on field
+						document.fire(Tapestry.FOCUS_CHANGE_EVENT, this.field);
+						 
+ 				} 
                 this.hidePopup();
 
                 new Effect.Highlight(this.field);