@syncfusion/ej2-calendars 19.3.53 → 19.4.42

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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/ej2-calendars.umd.min.js +2 -2
  3. package/dist/ej2-calendars.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-calendars.es2015.js +37 -4
  5. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  6. package/dist/es6/ej2-calendars.es5.js +37 -4
  7. package/dist/es6/ej2-calendars.es5.js.map +1 -1
  8. package/dist/global/ej2-calendars.min.js +2 -2
  9. package/dist/global/ej2-calendars.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +10 -10
  12. package/src/daterangepicker/daterangepicker.js +1 -1
  13. package/src/maskbase/masked-date-time.d.ts +3 -0
  14. package/src/maskbase/masked-date-time.js +23 -0
  15. package/src/timepicker/timepicker.js +13 -3
  16. package/styles/bootstrap5-dark.css +1 -1
  17. package/styles/bootstrap5.css +1 -1
  18. package/styles/calendar/_bootstrap-dark-definition.scss +1 -0
  19. package/styles/calendar/_bootstrap-definition.scss +1 -0
  20. package/styles/calendar/_bootstrap4-definition.scss +1 -0
  21. package/styles/calendar/_bootstrap5-definition.scss +1 -0
  22. package/styles/calendar/_fabric-dark-definition.scss +1 -0
  23. package/styles/calendar/_fabric-definition.scss +1 -0
  24. package/styles/calendar/_fluent-definition.scss +214 -0
  25. package/styles/calendar/_highcontrast-definition.scss +1 -0
  26. package/styles/calendar/_highcontrast-light-definition.scss +1 -0
  27. package/styles/calendar/_material-dark-definition.scss +1 -0
  28. package/styles/calendar/_material-definition.scss +1 -0
  29. package/styles/calendar/_tailwind-definition.scss +1 -0
  30. package/styles/calendar/_theme.scss +1 -1
  31. package/styles/calendar/bootstrap5-dark.css +1 -1
  32. package/styles/calendar/bootstrap5.css +1 -1
  33. package/styles/calendar/icons/_fluent.scss +12 -0
  34. package/styles/datepicker/_fluent-definition.scss +36 -0
  35. package/styles/datepicker/_material-dark-definition.scss +1 -0
  36. package/styles/datepicker/_material-definition.scss +1 -0
  37. package/styles/datepicker/icons/_fluent.scss +55 -0
  38. package/styles/daterangepicker/_fluent-definition.scss +222 -0
  39. package/styles/daterangepicker/_theme.scss +8 -8
  40. package/styles/daterangepicker/icons/_fluent.scss +67 -0
  41. package/styles/datetimepicker/_fluent-definition.scss +55 -0
  42. package/styles/datetimepicker/icons/_fluent.scss +11 -0
  43. package/styles/timepicker/_fluent-definition.scss +52 -0
  44. package/styles/timepicker/icons/_fluent.scss +13 -0
@@ -8349,7 +8349,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
8349
8349
  this.disabledDayCnt = null;
8350
8350
  const localDate = new Date(+this.startValue);
8351
8351
  let count = 0;
8352
- while (+localDate <= +this.endValue) {
8352
+ while (+localDate <= +this.endValue && +this.endValue <= +this.max) {
8353
8353
  this.virtualRenderCellArgs = {
8354
8354
  date: localDate,
8355
8355
  isDisabled: false
@@ -10221,7 +10221,7 @@ let TimePicker = class TimePicker extends Component {
10221
10221
  case 'shiftTab':
10222
10222
  if (!this.isPopupOpen() && this.enableMask && !this.readonly) {
10223
10223
  if ((this.inputElement.selectionStart == 0 && this.inputElement.selectionEnd == this.inputElement.value.length) ||
10224
- (this.inputElement.selectionEnd !== length && event.action == 'tab') ||
10224
+ (this.inputElement.selectionEnd !== this.inputElement.value.length && event.action == 'tab') ||
10225
10225
  (this.inputElement.selectionStart !== 0 && event.action == 'shiftTab') || (event.action == 'left' || event.action == 'right')) {
10226
10226
  event.preventDefault();
10227
10227
  }
@@ -10705,7 +10705,12 @@ let TimePicker = class TimePicker extends Component {
10705
10705
  if (!inputVal) {
10706
10706
  this.updateInputValue(this.maskedDateValue);
10707
10707
  }
10708
- this.createMask();
10708
+ if (isNullOrUndefined(val) && value != this.maskedDateValue) {
10709
+ this.createMask();
10710
+ }
10711
+ if (isNullOrUndefined(val) && value == this.maskedDateValue) {
10712
+ this.updateInputValue(this.maskedDateValue);
10713
+ }
10709
10714
  }
10710
10715
  }
10711
10716
  }
@@ -10778,7 +10783,12 @@ let TimePicker = class TimePicker extends Component {
10778
10783
  if (time == '') {
10779
10784
  this.updateInputValue(this.maskedDateValue);
10780
10785
  }
10781
- this.createMask();
10786
+ if (isNullOrUndefined(time) && value != this.maskedDateValue) {
10787
+ this.createMask();
10788
+ }
10789
+ if (isNullOrUndefined(time) && value == this.maskedDateValue) {
10790
+ this.updateInputValue(this.maskedDateValue);
10791
+ }
10782
10792
  }
10783
10793
  }
10784
10794
  return time;
@@ -13313,6 +13323,9 @@ class MaskedDateTime {
13313
13323
  this.isYearZero = false;
13314
13324
  this.dayTypeCount = 0;
13315
13325
  this.monthTypeCount = 0;
13326
+ this.hourTypeCount = 0;
13327
+ this.minuteTypeCount = 0;
13328
+ this.secondTypeCount = 0;
13316
13329
  this.parent = parent;
13317
13330
  this.dateformat = this.getCulturedFormat();
13318
13331
  this.maskDateValue = this.parent.value != null ? new Date(+this.parent.value) : new Date();
@@ -13584,6 +13597,7 @@ class MaskedDateTime {
13584
13597
  newDateValue.setHours(Math.floor(newDateValue.getHours() / 12) * 12 + (this.hour % 12));
13585
13598
  this.isNavigate = this.hour.toString().length === 2;
13586
13599
  this.isHourPart = true;
13600
+ this.hourTypeCount = this.hourTypeCount + 1;
13587
13601
  break;
13588
13602
  case 'H':
13589
13603
  this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
@@ -13596,6 +13610,7 @@ class MaskedDateTime {
13596
13610
  newDateValue.setHours(this.hour);
13597
13611
  this.isNavigate = this.hour.toString().length === 2;
13598
13612
  this.isHourPart = true;
13613
+ this.hourTypeCount = this.hourTypeCount + 1;
13599
13614
  break;
13600
13615
  case 'm':
13601
13616
  let minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
@@ -13608,6 +13623,7 @@ class MaskedDateTime {
13608
13623
  newDateValue.setMinutes(minutes);
13609
13624
  this.isNavigate = minutes.toString().length === 2;
13610
13625
  this.isMinutePart = true;
13626
+ this.minuteTypeCount = this.minuteTypeCount + 1;
13611
13627
  break;
13612
13628
  case 's':
13613
13629
  let seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
@@ -13620,6 +13636,7 @@ class MaskedDateTime {
13620
13636
  newDateValue.setSeconds(seconds);
13621
13637
  this.isNavigate = seconds.toString().length === 2;
13622
13638
  this.isSecondsPart = true;
13639
+ this.secondTypeCount = this.secondTypeCount + 1;
13623
13640
  break;
13624
13641
  case 'a':
13625
13642
  this.periodCharacter += newVal[start - 1].toLowerCase();
@@ -13718,24 +13735,40 @@ class MaskedDateTime {
13718
13735
  break;
13719
13736
  case 'hh':
13720
13737
  result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours() % 12 || 12, 2) : proxy.defaultConstant['hour'].toString();
13738
+ if (proxy.hourTypeCount == 2) {
13739
+ proxy.isNavigate = true;
13740
+ proxy.hourTypeCount = 0;
13741
+ }
13721
13742
  break;
13722
13743
  case 'H':
13723
13744
  result = proxy.isHourPart ? proxy.maskDateValue.getHours().toString() : proxy.defaultConstant['hour'].toString();
13724
13745
  break;
13725
13746
  case 'HH':
13726
13747
  result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours(), 2) : proxy.defaultConstant['hour'].toString();
13748
+ if (proxy.hourTypeCount == 2) {
13749
+ proxy.isNavigate = true;
13750
+ proxy.hourTypeCount = 0;
13751
+ }
13727
13752
  break;
13728
13753
  case 'm':
13729
13754
  result = proxy.isMinutePart ? proxy.maskDateValue.getMinutes().toString() : proxy.defaultConstant['minute'].toString();
13730
13755
  break;
13731
13756
  case 'mm':
13732
13757
  result = proxy.isMinutePart ? proxy.roundOff(proxy.maskDateValue.getMinutes(), 2) : proxy.defaultConstant['minute'].toString();
13758
+ if (proxy.minuteTypeCount == 2) {
13759
+ proxy.isNavigate = true;
13760
+ proxy.minuteTypeCount = 0;
13761
+ }
13733
13762
  break;
13734
13763
  case 's':
13735
13764
  result = proxy.isSecondsPart ? proxy.maskDateValue.getSeconds().toString() : proxy.defaultConstant['second'].toString();
13736
13765
  break;
13737
13766
  case 'ss':
13738
13767
  result = proxy.isSecondsPart ? proxy.roundOff(proxy.maskDateValue.getSeconds(), 2) : proxy.defaultConstant['second'].toString();
13768
+ if (proxy.secondTypeCount == 2) {
13769
+ proxy.isNavigate = true;
13770
+ proxy.secondTypeCount = 0;
13771
+ }
13739
13772
  break;
13740
13773
  case 'f':
13741
13774
  result = Math.floor(proxy.maskDateValue.getMilliseconds() / 100).toString();