[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: No change event when datePicker updates t:datefield
From: Svein-Erik_Løken <svein () jacilla ! no>
Date: 2015-08-24 11:37:19
Message-ID: VI1PR08MB052582A373B064697A1AF9EFD2620 () VI1PR08MB0525 ! eurprd08 ! prod ! outlook ! com
[Download RAW message or body]
When fields in my side panel are updated, I call submit on the change event. If \
datePicker is used no change event are fired.
I could find a workaround without modification of datefield.js. Any suggestion?
One line added by me: _this.field.$.change();
Controller.prototype.onSelect = function() {
var date;
date = this.datePicker.getDate();
if (date === null) {
this.hidePopup();
this.clearFieldError();
this.field.value("");
return;
}
this.field.addClass("ajax-wait");
return ajax(this.container.attr("data-format-url"), {
data: {
input: date.getTime()
},
failure: (function(_this) {
return function(response, message) {
_this.field.removeClass("ajax-wait");
return _this.fieldError(message);
};
})(this),
success: (function(_this) {
return function(response) {
_this.field.removeClass("ajax-wait");
_this.clearFieldError();
_this.field.value(response.json.result);
//trigger change event on field
_this.field.$.change();
return _this.hidePopup();
};
})(this)
});
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic