@shival99/z-ui 1.1.14 → 1.1.16

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.
package/README.md CHANGED
@@ -26,7 +26,7 @@ pnpm add @shival99/z-ui
26
26
  pnpm add @angular/cdk @ng-icons/core @ng-icons/lucide @ng-icons/iconsax \
27
27
  @tanstack/angular-table @shival99/angular-virtual \
28
28
  class-variance-authority clsx tailwind-merge \
29
- ngx-mask ngx-scrollbar ngx-sonner ngxtension minisearch
29
+ ngx-mask ngx-scrollbar @shival99/ngx-sonner ngxtension minisearch
30
30
  ```
31
31
 
32
32
  ### Optional Dependencies
@@ -1308,12 +1308,9 @@ class ZCalendarComponent {
1308
1308
  this._endView.set('day');
1309
1309
  }
1310
1310
  _backupIfNeeded() {
1311
- const needsConfirmation = this.showOkButton() || this.showCancelButton();
1312
- if (needsConfirmation) {
1313
- this._backupSelectedDate.set(this._selectedDate());
1314
- this._backupRangeStart.set(this._rangeStart());
1315
- this._backupRangeEnd.set(this._rangeEnd());
1316
- }
1311
+ this._backupSelectedDate.set(this._selectedDate());
1312
+ this._backupRangeStart.set(this._rangeStart());
1313
+ this._backupRangeEnd.set(this._rangeEnd());
1317
1314
  }
1318
1315
  onPopoverHide() {
1319
1316
  this._hoveredDate.set(null);
@@ -1321,6 +1318,13 @@ class ZCalendarComponent {
1321
1318
  if (needsConfirmation && !this._appliedViaOk()) {
1322
1319
  this._restoreFromBackup();
1323
1320
  }
1321
+ if (this.isRangeMode()) {
1322
+ const hasIncompleteRange = this._rangeStart() && !this._rangeEnd();
1323
+ if (hasIncompleteRange) {
1324
+ this._restoreFromBackup();
1325
+ this._dirty.set(false);
1326
+ }
1327
+ }
1324
1328
  if (this._dirty()) {
1325
1329
  this._touched.set(true);
1326
1330
  }
@@ -1504,6 +1508,9 @@ class ZCalendarComponent {
1504
1508
  this._skipBlurHandler.set(false);
1505
1509
  return;
1506
1510
  }
1511
+ if (this.isRangeMode()) {
1512
+ return;
1513
+ }
1507
1514
  const needsConfirmation = this.showOkButton() || this.showCancelButton();
1508
1515
  if (needsConfirmation && this.isOpen()) {
1509
1516
  return;