@acorex/components 22.3.16 → 22.3.17

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.
@@ -739,16 +739,23 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
739
739
  * @ignore
740
740
  */
741
741
  _handlePrevClick() {
742
- this._navUserInteraction = true;
743
- this.prev();
744
- this._navUserInteraction = false;
742
+ this._navByArrowButton(true);
745
743
  }
746
744
  /**
747
745
  * @ignore
748
746
  */
749
747
  _handleNextClick() {
748
+ this._navByArrowButton(false);
749
+ }
750
+ /**
751
+ * Maps prev/next arrow clicks to calendar navigation (RTL inverts arrow semantics).
752
+ *
753
+ * @ignore
754
+ */
755
+ _navByArrowButton(isPrevButton) {
756
+ const goBackward = this.isRtl() ? !isPrevButton : isPrevButton;
750
757
  this._navUserInteraction = true;
751
- this.next();
758
+ this._navNextPrev(goBackward);
752
759
  this._navUserInteraction = false;
753
760
  }
754
761
  /**
@@ -1381,30 +1388,27 @@ class AXCalendarRangeComponent extends classes((MXValueComponent), MXInteractive
1381
1388
  * @ignore
1382
1389
  */
1383
1390
  handlePrevClick() {
1384
- this._navUserInteraction = true;
1385
- const view = this._c1.activeView;
1386
- const d1 = this._c1.displayRange.startTime;
1387
- if (view == 'day' || view == 'month') {
1388
- this._c1.prev();
1389
- }
1390
- else if (view == 'year') {
1391
- this._c1.navTo(d1.add('year', -20));
1392
- }
1393
- this._syncNav1();
1394
- this._navUserInteraction = false;
1391
+ this._navRangeByArrowButton(true);
1395
1392
  }
1396
1393
  /**
1397
1394
  * @ignore
1398
1395
  */
1399
1396
  handleNextClick() {
1397
+ this._navRangeByArrowButton(false);
1398
+ }
1399
+ /**
1400
+ * @ignore
1401
+ */
1402
+ _navRangeByArrowButton(isPrevButton) {
1403
+ const goBackward = this.localeService.isRtl() ? !isPrevButton : isPrevButton;
1400
1404
  this._navUserInteraction = true;
1401
1405
  const view = this._c1.activeView;
1402
1406
  const d1 = this._c1.displayRange.startTime;
1403
1407
  if (view == 'day' || view == 'month') {
1404
- this._c1.next();
1408
+ goBackward ? this._c1.prev() : this._c1.next();
1405
1409
  }
1406
1410
  else if (view == 'year') {
1407
- this._c1.navTo(d1.add('year', 20));
1411
+ this._c1.navTo(d1.add('year', goBackward ? -20 : 20));
1408
1412
  }
1409
1413
  this._syncNav1();
1410
1414
  this._navUserInteraction = false;