@churchillliving/se-ui-toolkit 6.53.509 → 6.53.510

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.
@@ -9802,14 +9802,37 @@
9802
9802
  this.selectDate(dateRange, false);
9803
9803
  }
9804
9804
  };
9805
+ SeGlobalFilterComponent.prototype.containsWhitespace = function (str) {
9806
+ return str.includes(' ');
9807
+ };
9808
+ SeGlobalFilterComponent.prototype.addSpacesatfirst = function (x) {
9809
+ return " " + x;
9810
+ };
9811
+ SeGlobalFilterComponent.prototype.addSpacesatlast = function (x) {
9812
+ return x + " ";
9813
+ };
9805
9814
  // change calendar format on run time if user type date on the calendar field.
9806
9815
  SeGlobalFilterComponent.prototype.calendarFocusEvent = function (globalFilter, event) {
9807
9816
  var _this = this;
9808
9817
  var _a, _b, _c, _d, _e;
9809
9818
  (_a = document.getElementsByClassName(globalFilter.displayText)[0]) === null || _a === void 0 ? void 0 : _a.addEventListener('keyup', function (a) {
9810
- var _a, _b, _c;
9819
+ var _a, _b, _c, _d, _e, _f, _g;
9811
9820
  var year = (_c = (_b = (_a = a === null || a === void 0 ? void 0 : a.target) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toString()) === null || _c === void 0 ? void 0 : _c.split('/')[2];
9812
9821
  year = year === null || year === void 0 ? void 0 : year.toString().split(" ")[0];
9822
+ var dateRangeValue = ((_e = (_d = a === null || a === void 0 ? void 0 : a.target) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.includes('-')) ? (_g = (_f = a === null || a === void 0 ? void 0 : a.target) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.split('-') : '';
9823
+ // adding space between from and to date in date range filter
9824
+ if (dateRangeValue.length == 2 && dateRangeValue[1].split('/').length == 3 && (!_this.containsWhitespace(dateRangeValue[0]) || !_this.containsWhitespace(dateRangeValue[1]))) {
9825
+ if (!_this.containsWhitespace(dateRangeValue[0])) {
9826
+ var fromDate = _this.addSpacesatlast(dateRangeValue[0]);
9827
+ dateRangeValue[0] = fromDate;
9828
+ }
9829
+ if (!_this.containsWhitespace(dateRangeValue[1])) {
9830
+ var toDate = _this.addSpacesatfirst(dateRangeValue[1]);
9831
+ dateRangeValue[1] = toDate;
9832
+ }
9833
+ var alue = dateRangeValue[0] + '-' + dateRangeValue[1];
9834
+ a.target.value = alue;
9835
+ }
9813
9836
  if ((year === null || year === void 0 ? void 0 : year.length) === 4) {
9814
9837
  _this.calendarFormat = 'mm/dd/yy';
9815
9838
  if (globalFilter.type === exports.GridFilterControlType.CALENDAR) {