@bnsights/bbsf-controls 1.0.20 → 1.0.21

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.
@@ -430,14 +430,15 @@
430
430
  };
431
431
  DateInputComponent.prototype.onDateSelect = function (item) {
432
432
  var DateValue;
433
+ var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
433
434
  if (this.options.SelectMode == 2) {
434
435
  for (var index = 0; index < item.value.length; index++) {
435
- item.value[index] = new Date(item.value[index]).toISOString();
436
+ item.value[index] = new Date(item.value[index] - tzoffset).toISOString().slice(0, -1);
436
437
  }
437
438
  DateValue = item.value;
438
439
  }
439
440
  else {
440
- DateValue = new Date(item.value).toISOString();
441
+ DateValue = new Date(item.value - tzoffset).toISOString().slice(0, -1);
441
442
  }
442
443
  this.DatePickerFormControl.setValue(DateValue);
443
444
  this.onChangeService.ChangeValue(this.options.Name);