@ldmjs/ui 1.0.47 → 1.0.48

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7514,8 +7514,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
7514
7514
  }
7515
7515
  }
7516
7516
  created() {
7517
- /* eslint-disable no-console */
7518
- console.log(this.placeholderTimepicker);
7519
7517
  this.dateMaskPromise = new Promise(resolve => {
7520
7518
  this.dateMaskPromiseResolve = resolve;
7521
7519
  });
@@ -7838,21 +7836,25 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
7838
7836
  // },
7839
7837
  // },
7840
7838
  // };
7841
- this.timeMask = IMask(inputEl, {});
7842
- this.timeMask._unbindEvents();
7843
- this.timeMask._bindEvents();
7844
- this.timeMask.on('complete', () => this.onTimeMaskedValueChanged(this.timeMask.value));
7839
+ // this.timeMask = IMask(inputEl as HTMLElement, {
7840
+ // mask: 'HH:mm',
7841
+ // });
7842
+ // this.timeMask._unbindEvents();
7843
+ // this.timeMask._bindEvents();
7844
+ // this.timeMask.on('complete', () => this.onTimeMaskedValueChanged(this.timeMask.value));
7845
7845
  }
7846
7846
  }
7847
7847
  }
7848
7848
  parseDate(value) {
7849
- if (!value || value.length < 10) {
7849
+ if (!value) {
7850
7850
  return null;
7851
7851
  }
7852
+ const ru = this.locale.includes('ru');
7853
+ const separator = ru ? '.' : '/';
7854
+ const ddMMyyyy = value.split(separator);
7855
+ let dt;
7852
7856
  try {
7853
- const ddMMyyyy = value.split('.');
7854
- let dt;
7855
- if (this.locale.includes('ru')) {
7857
+ if (ru) {
7856
7858
  dt = new Date(Number(ddMMyyyy[2]), Number(ddMMyyyy[1]) - 1, Number(ddMMyyyy[0]));
7857
7859
  }
7858
7860
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "ldm ui",
5
5
  "main": "dist/index.js",
6
6
  "engines": {