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:07:44 UTC
svn commit: r1325308 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
Author: ffacon
Date: Thu Apr 12 15:07:43 2012
New Revision: 1325308
URL: http://svn.apache.org/viewvc?rev=1325308&view=rev
Log:
TAP5-1844 : Datefield value must be validated after change
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js?rev=1325308&r1=1325307&r2=1325308&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js Thu Apr 12 15:07:43 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);