@haiilo/catalyst 6.0.0 → 6.0.2

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.
@@ -3255,7 +3255,7 @@ function monthsForLocale(language, month = 'long') {
3255
3255
  function getLocale(language) {
3256
3256
  return {
3257
3257
  firstDayOfWeek: getFirstDayOfWeek(language),
3258
- rangeSeparator: ' ',
3258
+ rangeSeparator: ' - ',
3259
3259
  weekAbbreviation: '',
3260
3260
  yearAriaLabel: catIconRegistry.catI18nRegistry.t('datepicker.year'),
3261
3261
  monthAriaLabel: catIconRegistry.catI18nRegistry.t('datepicker.month'),
@@ -3329,7 +3329,7 @@ const CatDatepickerFlat = class {
3329
3329
  altInput: true,
3330
3330
  prevArrow: '←',
3331
3331
  nextArrow: '→',
3332
- dateFormat: 'Z',
3332
+ dateFormat: this.dateFormat,
3333
3333
  altFormat: format,
3334
3334
  ariaDateFormat: format,
3335
3335
  mode: this.mode === 'daterange' ? 'range' : 'single',
@@ -3347,7 +3347,6 @@ const CatDatepickerFlat = class {
3347
3347
  this.value = dateStr;
3348
3348
  }
3349
3349
  this.catChange.emit(this.value);
3350
- console.log(this.value);
3351
3350
  }
3352
3351
  });
3353
3352
  }
@@ -3373,10 +3372,9 @@ const CatDatepickerFlat = class {
3373
3372
  return (index.h("cat-input", { ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
3374
3373
  e.stopPropagation();
3375
3374
  this.pickr?.setDate(e.detail);
3376
- if (this.value !== e.detail || undefined) {
3375
+ if (this.value !== (e.detail || undefined)) {
3377
3376
  this.value = e.detail || undefined;
3378
3377
  this.catChange.emit(this.value);
3379
- console.log(this.value);
3380
3378
  }
3381
3379
  }, onCatFocus: e => {
3382
3380
  e.stopPropagation();
@@ -3386,6 +3384,17 @@ const CatDatepickerFlat = class {
3386
3384
  this.catBlur.emit(e.detail);
3387
3385
  } }));
3388
3386
  }
3387
+ get dateFormat() {
3388
+ if (this.mode === 'week') {
3389
+ return 'W';
3390
+ }
3391
+ else if (this.mode === 'time') {
3392
+ return 'H:i';
3393
+ }
3394
+ else {
3395
+ return 'Z';
3396
+ }
3397
+ }
3389
3398
  };
3390
3399
  CatDatepickerFlat.style = catDatepickerCss;
3391
3400