@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.
@@ -3251,7 +3251,7 @@ function monthsForLocale(language, month = 'long') {
3251
3251
  function getLocale(language) {
3252
3252
  return {
3253
3253
  firstDayOfWeek: getFirstDayOfWeek(language),
3254
- rangeSeparator: ' ',
3254
+ rangeSeparator: ' - ',
3255
3255
  weekAbbreviation: '',
3256
3256
  yearAriaLabel: catI18nRegistry.t('datepicker.year'),
3257
3257
  monthAriaLabel: catI18nRegistry.t('datepicker.month'),
@@ -3325,7 +3325,7 @@ const CatDatepickerFlat = class {
3325
3325
  altInput: true,
3326
3326
  prevArrow: '←',
3327
3327
  nextArrow: '→',
3328
- dateFormat: 'Z',
3328
+ dateFormat: this.dateFormat,
3329
3329
  altFormat: format,
3330
3330
  ariaDateFormat: format,
3331
3331
  mode: this.mode === 'daterange' ? 'range' : 'single',
@@ -3343,7 +3343,6 @@ const CatDatepickerFlat = class {
3343
3343
  this.value = dateStr;
3344
3344
  }
3345
3345
  this.catChange.emit(this.value);
3346
- console.log(this.value);
3347
3346
  }
3348
3347
  });
3349
3348
  }
@@ -3369,10 +3368,9 @@ const CatDatepickerFlat = class {
3369
3368
  return (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 => {
3370
3369
  e.stopPropagation();
3371
3370
  this.pickr?.setDate(e.detail);
3372
- if (this.value !== e.detail || undefined) {
3371
+ if (this.value !== (e.detail || undefined)) {
3373
3372
  this.value = e.detail || undefined;
3374
3373
  this.catChange.emit(this.value);
3375
- console.log(this.value);
3376
3374
  }
3377
3375
  }, onCatFocus: e => {
3378
3376
  e.stopPropagation();
@@ -3382,6 +3380,17 @@ const CatDatepickerFlat = class {
3382
3380
  this.catBlur.emit(e.detail);
3383
3381
  } }));
3384
3382
  }
3383
+ get dateFormat() {
3384
+ if (this.mode === 'week') {
3385
+ return 'W';
3386
+ }
3387
+ else if (this.mode === 'time') {
3388
+ return 'H:i';
3389
+ }
3390
+ else {
3391
+ return 'Z';
3392
+ }
3393
+ }
3385
3394
  };
3386
3395
  CatDatepickerFlat.style = catDatepickerCss;
3387
3396