@syncfusion/ej2-calendars 19.3.55 → 19.3.56

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.
@@ -10828,7 +10828,12 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10828
10828
  if (!inputVal) {
10829
10829
  this.updateInputValue(this.maskedDateValue);
10830
10830
  }
10831
- this.createMask();
10831
+ if (isNullOrUndefined(val) && value != this.maskedDateValue) {
10832
+ this.createMask();
10833
+ }
10834
+ if (isNullOrUndefined(val) && value == this.maskedDateValue) {
10835
+ this.updateInputValue(this.maskedDateValue);
10836
+ }
10832
10837
  }
10833
10838
  }
10834
10839
  }
@@ -10901,7 +10906,12 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10901
10906
  if (time == '') {
10902
10907
  this.updateInputValue(this.maskedDateValue);
10903
10908
  }
10904
- this.createMask();
10909
+ if (isNullOrUndefined(time) && value != this.maskedDateValue) {
10910
+ this.createMask();
10911
+ }
10912
+ if (isNullOrUndefined(time) && value == this.maskedDateValue) {
10913
+ this.updateInputValue(this.maskedDateValue);
10914
+ }
10905
10915
  }
10906
10916
  }
10907
10917
  return time;
@@ -13461,6 +13471,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13461
13471
  this.isYearZero = false;
13462
13472
  this.dayTypeCount = 0;
13463
13473
  this.monthTypeCount = 0;
13474
+ this.hourTypeCount = 0;
13475
+ this.minuteTypeCount = 0;
13476
+ this.secondTypeCount = 0;
13464
13477
  this.parent = parent;
13465
13478
  this.dateformat = this.getCulturedFormat();
13466
13479
  this.maskDateValue = this.parent.value != null ? new Date(+this.parent.value) : new Date();
@@ -13733,6 +13746,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13733
13746
  newDateValue.setHours(Math.floor(newDateValue.getHours() / 12) * 12 + (this.hour % 12));
13734
13747
  this.isNavigate = this.hour.toString().length === 2;
13735
13748
  this.isHourPart = true;
13749
+ this.hourTypeCount = this.hourTypeCount + 1;
13736
13750
  break;
13737
13751
  case 'H':
13738
13752
  this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
@@ -13745,6 +13759,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13745
13759
  newDateValue.setHours(this.hour);
13746
13760
  this.isNavigate = this.hour.toString().length === 2;
13747
13761
  this.isHourPart = true;
13762
+ this.hourTypeCount = this.hourTypeCount + 1;
13748
13763
  break;
13749
13764
  case 'm':
13750
13765
  var minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
@@ -13757,6 +13772,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13757
13772
  newDateValue.setMinutes(minutes);
13758
13773
  this.isNavigate = minutes.toString().length === 2;
13759
13774
  this.isMinutePart = true;
13775
+ this.minuteTypeCount = this.minuteTypeCount + 1;
13760
13776
  break;
13761
13777
  case 's':
13762
13778
  var seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
@@ -13769,6 +13785,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13769
13785
  newDateValue.setSeconds(seconds);
13770
13786
  this.isNavigate = seconds.toString().length === 2;
13771
13787
  this.isSecondsPart = true;
13788
+ this.secondTypeCount = this.secondTypeCount + 1;
13772
13789
  break;
13773
13790
  case 'a':
13774
13791
  this.periodCharacter += newVal[start - 1].toLowerCase();
@@ -13867,24 +13884,40 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13867
13884
  break;
13868
13885
  case 'hh':
13869
13886
  result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours() % 12 || 12, 2) : proxy.defaultConstant['hour'].toString();
13887
+ if (proxy.hourTypeCount == 2) {
13888
+ proxy.isNavigate = true;
13889
+ proxy.hourTypeCount = 0;
13890
+ }
13870
13891
  break;
13871
13892
  case 'H':
13872
13893
  result = proxy.isHourPart ? proxy.maskDateValue.getHours().toString() : proxy.defaultConstant['hour'].toString();
13873
13894
  break;
13874
13895
  case 'HH':
13875
13896
  result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours(), 2) : proxy.defaultConstant['hour'].toString();
13897
+ if (proxy.hourTypeCount == 2) {
13898
+ proxy.isNavigate = true;
13899
+ proxy.hourTypeCount = 0;
13900
+ }
13876
13901
  break;
13877
13902
  case 'm':
13878
13903
  result = proxy.isMinutePart ? proxy.maskDateValue.getMinutes().toString() : proxy.defaultConstant['minute'].toString();
13879
13904
  break;
13880
13905
  case 'mm':
13881
13906
  result = proxy.isMinutePart ? proxy.roundOff(proxy.maskDateValue.getMinutes(), 2) : proxy.defaultConstant['minute'].toString();
13907
+ if (proxy.minuteTypeCount == 2) {
13908
+ proxy.isNavigate = true;
13909
+ proxy.minuteTypeCount = 0;
13910
+ }
13882
13911
  break;
13883
13912
  case 's':
13884
13913
  result = proxy.isSecondsPart ? proxy.maskDateValue.getSeconds().toString() : proxy.defaultConstant['second'].toString();
13885
13914
  break;
13886
13915
  case 'ss':
13887
13916
  result = proxy.isSecondsPart ? proxy.roundOff(proxy.maskDateValue.getSeconds(), 2) : proxy.defaultConstant['second'].toString();
13917
+ if (proxy.secondTypeCount == 2) {
13918
+ proxy.isNavigate = true;
13919
+ proxy.secondTypeCount = 0;
13920
+ }
13888
13921
  break;
13889
13922
  case 'f':
13890
13923
  result = Math.floor(proxy.maskDateValue.getMilliseconds() / 100).toString();