Svein created TAP5-2492:
---------------------------

             Summary: No change event when datePicker updates t:datefield 
                 Key: TAP5-2492
                 URL: https://issues.apache.org/jira/browse/TAP5-2492
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.4
            Reporter: Svein


When fields in my side panel are updated, I call submit on the change event. If 
datePicker is used no change event are fired.

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)
  });
};







--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to