@syncfusion/ej2-inputs 28.1.41 → 28.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7923,7 +7923,8 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7923
7923
  var currentRule = this.rules["" + name]["" + rule];
7924
7924
  var dateFormat = ((rule === 'min' || rule === 'max') && this.rules['' + name].date &&
7925
7925
  typeof (this.rules['' + name].date) === 'string') ? this.rules['' + name].date : null;
7926
- var args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element, format: dateFormat };
7926
+ var args = { value: this.inputElement.value,
7927
+ param: param, element: this.inputElement, formElement: this.element, format: dateFormat, culture: this.locale };
7927
7928
  this.trigger('validationBegin', args);
7928
7929
  if (!args.param && rule === 'required') {
7929
7930
  return true;
@@ -8105,7 +8106,7 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
8105
8106
  },
8106
8107
  date: function (option) {
8107
8108
  if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
8108
- var globalize = new Internationalization;
8109
+ var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
8109
8110
  var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
8110
8111
  var dateValue = globalize.parseDate(option.value, dateOptions);
8111
8112
  return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
@@ -8121,7 +8122,7 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
8121
8122
  }
8122
8123
  // Maximum rule validation for date
8123
8124
  if (option.format && option.format !== '') {
8124
- var globalize = new Internationalization;
8125
+ var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
8125
8126
  var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
8126
8127
  var dateValue = globalize.parseDate(option.value, dateOptions);
8127
8128
  var maxValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
@@ -8143,7 +8144,7 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
8143
8144
  else {
8144
8145
  // Minimum rule validation for date
8145
8146
  if (option.format && option.format !== '') {
8146
- var globalize = new Internationalization;
8147
+ var globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
8147
8148
  var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
8148
8149
  var dateValue = globalize.parseDate(option.value, dateOptions);
8149
8150
  var minValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
@@ -17112,12 +17113,15 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17112
17113
  };
17113
17114
  this.tooltipOpen = false;
17114
17115
  this.isTouchSelected = false;
17116
+ if (closest(this.element, 'form') && this.element.getAttribute('value')) {
17117
+ this.setProperties({ value: this.element.getAttribute('value') }, true);
17118
+ }
17115
17119
  };
17116
17120
  Rating.prototype.render = function () {
17117
17121
  this.initialize();
17118
17122
  this.updateMinValue();
17119
17123
  this.updateTemplateFunction();
17120
- this.triggerChange(null, this.value, false);
17124
+ this.triggerChange(null, this.value, false, true);
17121
17125
  this.renderItems();
17122
17126
  this.displayLabel();
17123
17127
  };
@@ -17484,8 +17488,10 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17484
17488
  this.updateItemValue();
17485
17489
  this.updateLabel();
17486
17490
  };
17487
- Rating.prototype.triggerChange = function (e, val, isInteracted) {
17491
+ Rating.prototype.triggerChange = function (e, val, isInteracted, isInitial) {
17488
17492
  if (isInteracted === void 0) { isInteracted = true; }
17493
+ if (isInitial === void 0) { isInitial = false; }
17494
+ var ratingObj = this;
17489
17495
  val = this.validateValue(val);
17490
17496
  this.currentValue = val;
17491
17497
  if (this.currentValue === this.value) {
@@ -17493,7 +17499,12 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17493
17499
  }
17494
17500
  var eventArgs = { event: e, isInteracted: isInteracted, value: val, previousValue: this.value };
17495
17501
  this.setProperties({ value: val }, true);
17496
- this.trigger('valueChanged', eventArgs);
17502
+ if (this.isAngular && !isInitial) {
17503
+ ratingObj.localChange({ value: val });
17504
+ }
17505
+ if (!isInitial) {
17506
+ this.trigger('valueChanged', eventArgs);
17507
+ }
17497
17508
  };
17498
17509
  Rating.prototype.mouseMoveHandler = function (index, e) {
17499
17510
  if (this.isTouchSelected) {