@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.
@@ -7784,7 +7784,8 @@ let FormValidator = FormValidator_1 = class FormValidator extends Base {
7784
7784
  const currentRule = this.rules[`${name}`][`${rule}`];
7785
7785
  const dateFormat = ((rule === 'min' || rule === 'max') && this.rules['' + name].date &&
7786
7786
  typeof (this.rules['' + name].date) === 'string') ? this.rules['' + name].date : null;
7787
- const args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element, format: dateFormat };
7787
+ const args = { value: this.inputElement.value,
7788
+ param: param, element: this.inputElement, formElement: this.element, format: dateFormat, culture: this.locale };
7788
7789
  this.trigger('validationBegin', args);
7789
7790
  if (!args.param && rule === 'required') {
7790
7791
  return true;
@@ -7966,7 +7967,7 @@ FormValidator.checkValidator = {
7966
7967
  },
7967
7968
  date: (option) => {
7968
7969
  if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
7969
- const globalize = new Internationalization;
7970
+ const globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
7970
7971
  const dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
7971
7972
  const dateValue = globalize.parseDate(option.value, dateOptions);
7972
7973
  return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
@@ -7982,7 +7983,7 @@ FormValidator.checkValidator = {
7982
7983
  }
7983
7984
  // Maximum rule validation for date
7984
7985
  if (option.format && option.format !== '') {
7985
- const globalize = new Internationalization;
7986
+ const globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
7986
7987
  const dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
7987
7988
  const dateValue = globalize.parseDate(option.value, dateOptions);
7988
7989
  const maxValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
@@ -8004,7 +8005,7 @@ FormValidator.checkValidator = {
8004
8005
  else {
8005
8006
  // Minimum rule validation for date
8006
8007
  if (option.format && option.format !== '') {
8007
- const globalize = new Internationalization;
8008
+ const globalize = option.culture && option.culture !== '' ? new Internationalization(option.culture) : new Internationalization;
8008
8009
  const dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
8009
8010
  const dateValue = globalize.parseDate(option.value, dateOptions);
8010
8011
  const minValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
@@ -16675,12 +16676,15 @@ let Rating = class Rating extends Component {
16675
16676
  };
16676
16677
  this.tooltipOpen = false;
16677
16678
  this.isTouchSelected = false;
16679
+ if (closest(this.element, 'form') && this.element.getAttribute('value')) {
16680
+ this.setProperties({ value: this.element.getAttribute('value') }, true);
16681
+ }
16678
16682
  }
16679
16683
  render() {
16680
16684
  this.initialize();
16681
16685
  this.updateMinValue();
16682
16686
  this.updateTemplateFunction();
16683
- this.triggerChange(null, this.value, false);
16687
+ this.triggerChange(null, this.value, false, true);
16684
16688
  this.renderItems();
16685
16689
  this.displayLabel();
16686
16690
  }
@@ -17041,7 +17045,8 @@ let Rating = class Rating extends Component {
17041
17045
  this.updateItemValue();
17042
17046
  this.updateLabel();
17043
17047
  }
17044
- triggerChange(e, val, isInteracted = true) {
17048
+ triggerChange(e, val, isInteracted = true, isInitial = false) {
17049
+ const ratingObj = this;
17045
17050
  val = this.validateValue(val);
17046
17051
  this.currentValue = val;
17047
17052
  if (this.currentValue === this.value) {
@@ -17049,7 +17054,12 @@ let Rating = class Rating extends Component {
17049
17054
  }
17050
17055
  const eventArgs = { event: e, isInteracted: isInteracted, value: val, previousValue: this.value };
17051
17056
  this.setProperties({ value: val }, true);
17052
- this.trigger('valueChanged', eventArgs);
17057
+ if (this.isAngular && !isInitial) {
17058
+ ratingObj.localChange({ value: val });
17059
+ }
17060
+ if (!isInitial) {
17061
+ this.trigger('valueChanged', eventArgs);
17062
+ }
17053
17063
  }
17054
17064
  mouseMoveHandler(index, e) {
17055
17065
  if (this.isTouchSelected) {