@syncfusion/ej2-calendars 24.2.5 → 24.2.8

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 24.2.5
3
+ * version : 24.2.8
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-calendars@*",
3
- "_id": "@syncfusion/ej2-calendars@24.2.3",
3
+ "_id": "@syncfusion/ej2-calendars@24.2.5",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-jRcfZtIe8Ujqp2OFZrsPtDSq4UBajjypANh3DaJ1UVCvCziB8VB78wkrPABbpgb05moR5TR1qCehBu6Q2VnaFg==",
5
+ "_integrity": "sha512-TubAKr00yybjqjVfWRk1NKgc93KY3Ispr7+QY158f2EOmKrI5EOb+nqjvVZw9GH4rjpjQfS2qZtrF0fCfwUmgg==",
6
6
  "_location": "/@syncfusion/ej2-calendars",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -31,8 +31,8 @@
31
31
  "/@syncfusion/ej2-schedule",
32
32
  "/@syncfusion/ej2-vue-calendars"
33
33
  ],
34
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-24.2.3.tgz",
35
- "_shasum": "2d154e96239cdb5a7aa35879fb8937c9e1d9f418",
34
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-24.2.5.tgz",
35
+ "_shasum": "e61c5b6e682851df791464d6ce8893e44c7cde65",
36
36
  "_spec": "@syncfusion/ej2-calendars@*",
37
37
  "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
38
38
  "author": {
@@ -43,11 +43,11 @@
43
43
  },
44
44
  "bundleDependencies": false,
45
45
  "dependencies": {
46
- "@syncfusion/ej2-base": "~24.2.5",
47
- "@syncfusion/ej2-buttons": "~24.2.5",
48
- "@syncfusion/ej2-inputs": "~24.2.5",
49
- "@syncfusion/ej2-lists": "~24.2.4",
50
- "@syncfusion/ej2-popups": "~24.2.5"
46
+ "@syncfusion/ej2-base": "~24.2.7",
47
+ "@syncfusion/ej2-buttons": "~24.2.7",
48
+ "@syncfusion/ej2-inputs": "~24.2.7",
49
+ "@syncfusion/ej2-lists": "~24.2.8",
50
+ "@syncfusion/ej2-popups": "~24.2.8"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
@@ -80,6 +80,6 @@
80
80
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
81
81
  },
82
82
  "typings": "index.d.ts",
83
- "version": "24.2.5",
83
+ "version": "24.2.8",
84
84
  "sideEffects": false
85
85
  }
@@ -33,7 +33,7 @@ var DEVICE = 'e-device';
33
33
  var HEADER = 'e-header';
34
34
  var RTL = 'e-rtl';
35
35
  var CONTENT = 'e-content';
36
- var CONTENTTABLE = 'e-content-table';
36
+ var CONTENTTABLE = 'e-calandar-content-table';
37
37
  var YEAR = 'e-year';
38
38
  var MONTH = 'e-month';
39
39
  var DECADE = 'e-decade';
@@ -498,19 +498,19 @@ var CalendarBase = /** @class */ (function (_super) {
498
498
  this.effect = '';
499
499
  switch (e.action) {
500
500
  case 'moveLeft':
501
- if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains('e-content-table')) {
501
+ if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
502
502
  this.keyboardNavigate(-1, view, e, this.max, this.min);
503
503
  e.preventDefault();
504
504
  }
505
505
  break;
506
506
  case 'moveRight':
507
- if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains('e-content-table')) {
507
+ if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
508
508
  this.keyboardNavigate(1, view, e, this.max, this.min);
509
509
  e.preventDefault();
510
510
  }
511
511
  break;
512
512
  case 'moveUp':
513
- if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains('e-content-table')) {
513
+ if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
514
514
  if (view === 0) {
515
515
  this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
516
516
  }
@@ -521,7 +521,7 @@ var CalendarBase = /** @class */ (function (_super) {
521
521
  }
522
522
  break;
523
523
  case 'moveDown':
524
- if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains('e-content-table')) {
524
+ if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
525
525
  if (view === 0) {
526
526
  this.keyboardNavigate(7, view, e, this.max, this.min);
527
527
  }
@@ -173,7 +173,6 @@ export declare class DateRangePicker extends CalendarBase {
173
173
  protected touchRangeModule: Touch;
174
174
  protected touchRangeStart: boolean;
175
175
  protected iconRangeRight: string;
176
- private isKeyPressed;
177
176
  /**
178
177
  * Gets or sets the start and end date of the Calendar.
179
178
  * {% codeBlock src='daterangepicker/value/index.md' %}{% endcodeBlock %}
@@ -716,7 +715,6 @@ export declare class DateRangePicker extends CalendarBase {
716
715
  private modelRangeCloseHandler;
717
716
  private cancelFunction;
718
717
  private deviceHeaderUpdate;
719
- private keyupHandler;
720
718
  private applyFunction;
721
719
  private onMouseClick;
722
720
  private onMouseOver;
@@ -147,7 +147,6 @@ var DateRangePicker = /** @class */ (function (_super) {
147
147
  _this.invalidValueString = null;
148
148
  _this.isAngular = false;
149
149
  _this.preventChange = false;
150
- _this.isKeyPressed = false;
151
150
  _this.dateRangeOptions = options;
152
151
  return _this;
153
152
  }
@@ -503,7 +502,6 @@ var DateRangePicker = /** @class */ (function (_super) {
503
502
  EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
504
503
  EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
505
504
  EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
506
- EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
507
505
  if (this.showClearButton && this.inputWrapper.clearButton) {
508
506
  EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
509
507
  }
@@ -530,7 +528,6 @@ var DateRangePicker = /** @class */ (function (_super) {
530
528
  EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
531
529
  EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
532
530
  EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
533
- EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
534
531
  if (this.showClearButton && this.inputWrapper.clearButton) {
535
532
  EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
536
533
  }
@@ -785,8 +782,8 @@ var DateRangePicker = /** @class */ (function (_super) {
785
782
  var startDate = this.presetsItem[i].start;
786
783
  var endDate = this.presetsItem[i].end;
787
784
  if (this.startValue && this.endValue) {
788
- if ((+new Date(startDate.setHours(0, 0, 0, 0)) === +new Date(this.startValue.setHours(0, 0, 0, 0))) &&
789
- (+new Date(endDate.setHours(0, 0, 0, 0)) === +new Date(this.endValue.setHours(0, 0, 0, 0)))) {
785
+ if (startDate.getDate() == this.startValue.getDate() && startDate.getMonth() == this.startValue.getMonth() && startDate.getFullYear() == this.startValue.getFullYear()
786
+ && endDate.getDate() == this.endValue.getDate() && endDate.getMonth() == this.endValue.getMonth() && endDate.getFullYear() == this.endValue.getFullYear()) {
790
787
  this.activeIndex = i;
791
788
  this.isCustomRange = false;
792
789
  }
@@ -2765,9 +2762,6 @@ var DateRangePicker = /** @class */ (function (_super) {
2765
2762
  this.startButton.element.classList.add(ACTIVE);
2766
2763
  }
2767
2764
  };
2768
- DateRangePicker.prototype.keyupHandler = function (e) {
2769
- this.isKeyPressed = (this.inputElement.value !== this.previousEleValue) ? true : false;
2770
- };
2771
2765
  DateRangePicker.prototype.applyFunction = function (eve) {
2772
2766
  var isValueChanged = false;
2773
2767
  if (eve.type !== 'touchstart') {
@@ -2790,13 +2784,15 @@ var DateRangePicker = /** @class */ (function (_super) {
2790
2784
  eve.preventDefault();
2791
2785
  }
2792
2786
  if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
2787
+ if (!(this.previousStartValue && this.previousEndValue && this.startValue.getDate() == this.previousStartValue.getDate() && this.startValue.getMonth() == this.previousStartValue.getMonth() &&
2788
+ this.startValue.getFullYear() == this.previousStartValue.getFullYear()
2789
+ && this.endValue.getDate() == this.previousEndValue.getDate() && this.endValue.getMonth() == this.previousEndValue.getMonth()
2790
+ && this.endValue.getFullYear() == this.previousEndValue.getFullYear())) {
2791
+ Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
2792
+ }
2793
2793
  this.previousStartValue = new Date(+this.startValue);
2794
2794
  this.previousEndValue = new Date(+this.endValue);
2795
2795
  this.previousEleValue = this.inputElement.value;
2796
- if (!this.isKeyPressed) {
2797
- Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
2798
- }
2799
- this.isKeyPressed = false;
2800
2796
  if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
2801
2797
  isValueChanged = true;
2802
2798
  }
@@ -345,6 +345,7 @@ var MaskedDateTime = /** @class */ (function () {
345
345
  {
346
346
  var year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
347
347
  && !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
348
+ var yearValue = (this.dateformat.match(/y/g) || []).length;
348
349
  this.isShortYear = false;
349
350
  this.isYearZero = (newVal[start - 1] === '0');
350
351
  if (isNaN(year)) {
@@ -358,7 +359,7 @@ var MaskedDateTime = /** @class */ (function () {
358
359
  }
359
360
  else {
360
361
  newDateValue.setFullYear(year);
361
- if (year.toString().length === 4) {
362
+ if (year.toString().length === yearValue) {
362
363
  this.isNavigate = true;
363
364
  }
364
365
  this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
@@ -533,9 +534,6 @@ var MaskedDateTime = /** @class */ (function () {
533
534
  case 'yy':
534
535
  result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear() % 100, 2) : proxy.defaultConstant['year'].toString();
535
536
  result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);
536
- if (proxy.isYearPart) {
537
- proxy.isNavigate = proxy.isShortYear = (proxy.maskDateValue.getFullYear() % 100).toString().length === 2;
538
- }
539
537
  break;
540
538
  case 'y':
541
539
  case 'yyyy':