@dev-tcloud/tcloud-ui 0.1.9 → 0.1.10

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.
@@ -3131,7 +3131,7 @@ class TCloudUiDatepickerTimeComponent {
3131
3131
  if (mm === '00') {
3132
3132
  this.MM = mm;
3133
3133
  }
3134
- const notation = '00Z';
3134
+ const notation = '00';
3135
3135
  const str_date = `${ano}-${mes}-${dia}T${hh}:${mm}:${notation}`;
3136
3136
  const datetime = new Date(str_date);
3137
3137
  if (this.checkIsDate(datetime)) {
@@ -3406,8 +3406,8 @@ class TCloudUiRangeDateComponent {
3406
3406
  }
3407
3407
  if (filter_date) {
3408
3408
  this.result = {
3409
- start: this.getDateUTC(filter_date),
3410
- stop: this.getDateUTC(now)
3409
+ start: this.getTransformDate(filter_date),
3410
+ stop: this.getTransformDate(now)
3411
3411
  };
3412
3412
  this.onChange.emit(this.result);
3413
3413
  this.isValid = true;
@@ -3418,19 +3418,22 @@ class TCloudUiRangeDateComponent {
3418
3418
  this.isValid = false;
3419
3419
  }
3420
3420
  }
3421
- getDateUTC(dt) {
3421
+ getTransformDate(dt) {
3422
+ //return (dt).toLocaleString('pt-BR');
3423
+ return dt;
3424
+ /*
3422
3425
  const ano = dt.getFullYear();
3423
3426
  const mes = dt.getMonth();
3424
3427
  const dia = dt.getDate();
3425
3428
  const horas = dt.getHours();
3426
3429
  const minutos = dt.getMinutes();
3427
- const segundos = dt.getSeconds();
3428
- return new Date(Date.UTC(ano, mes, dia, horas, minutos, segundos));
3430
+ return new Date(Date.UTC(ano, mes, dia, horas, minutos));
3431
+ */
3429
3432
  }
3430
3433
  onChangeStartDateTime(event) {
3431
3434
  this.isValid = false;
3432
3435
  if (this.result && this.result.start) {
3433
- this.result.start = event.value;
3436
+ this.result.start = event.value = this.getTransformDate(event.value);
3434
3437
  this.onChange.emit(this.result);
3435
3438
  this.isValid = true;
3436
3439
  }
@@ -3442,7 +3445,7 @@ class TCloudUiRangeDateComponent {
3442
3445
  onChangeStopDateTime(event) {
3443
3446
  this.isValid = false;
3444
3447
  if (this.result && this.result.stop) {
3445
- this.result.start = event.value;
3448
+ this.result.stop = event.value = this.getTransformDate(event.value);
3446
3449
  this.onChange.emit(this.result);
3447
3450
  this.isValid = true;
3448
3451
  }
@@ -3641,7 +3644,6 @@ class TCloudUiFiltersComponent {
3641
3644
  this.searchIn(filter, 'sync');
3642
3645
  });
3643
3646
  }
3644
- // this.toResult();
3645
3647
  if (!this.useOnChangeSubmit) {
3646
3648
  this.result_accept(this.data);
3647
3649
  }
@@ -3810,6 +3812,15 @@ class TCloudUiFiltersComponent {
3810
3812
  this.emitSubmitFilters();
3811
3813
  }
3812
3814
  }
3815
+ getDateUTC(dt) {
3816
+ const ano = dt.getFullYear();
3817
+ const mes = dt.getMonth();
3818
+ const dia = dt.getDate();
3819
+ const horas = dt.getHours();
3820
+ const minutos = dt.getMinutes();
3821
+ const segundos = dt.getSeconds();
3822
+ return new Date(Date.UTC(ano, mes, dia, horas, minutos, segundos));
3823
+ }
3813
3824
  start_filter() {
3814
3825
  for (let i = 0; i < (this.data).length; i++) {
3815
3826
  this.setDataIndex(i, true);