@ntlab/ntjs-assets 2.0.42 → 2.0.43

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.
@@ -3999,11 +3999,18 @@ class Actions {
3999
3999
  this.display.hide();
4000
4000
  break;
4001
4001
  case ActionTypes$1.today: {
4002
- const today = new DateTime().setLocalization(this.optionsStore.options.localization);
4003
- this._eventEmitters.updateViewDate.emit(today);
4004
- //todo this this really a good idea?
4005
- if (this.validation.isValid(today, Unit.date))
4006
- this.dates.setValue(today, this.dates.lastPickedIndex);
4002
+ const day = new DateTime().setLocalization(this.optionsStore.options.localization);
4003
+ this._eventEmitters.updateViewDate.emit(day);
4004
+ if (!this.validation.isValid(day, Unit.date))
4005
+ break;
4006
+ if (this.optionsStore.options.dateRange)
4007
+ this.handleDateRange(day);
4008
+ else if (this.optionsStore.options.multipleDates) {
4009
+ this.handleMultiDate(day);
4010
+ }
4011
+ else {
4012
+ this.dates.setValue(day, this.dates.lastPickedIndex);
4013
+ }
4007
4014
  break;
4008
4015
  }
4009
4016
  }