@ptsecurity/mosaic 14.3.0 → 14.3.1

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.
@@ -1401,10 +1401,7 @@ class McDatepickerInput {
1401
1401
  this._value = null;
1402
1402
  return setTimeout(() => this.control.updateValueAndValidity());
1403
1403
  }
1404
- if (Object.values(date).some(isNaN)) {
1405
- return;
1406
- }
1407
- const newTimeObj = this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
1404
+ const newTimeObj = this.createDateTime(date);
1408
1405
  if (!newTimeObj) {
1409
1406
  this.lastValueValid = false;
1410
1407
  this._value = null;
@@ -1836,7 +1833,7 @@ class McDatepickerInput {
1836
1833
  else {
1837
1834
  return null;
1838
1835
  }
1839
- return this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
1836
+ return this.createDateTime(date);
1840
1837
  }
1841
1838
  getDefaultValue() {
1842
1839
  const defaultValue = this.value || this.dateAdapter.today();
@@ -2051,6 +2048,12 @@ class McDatepickerInput {
2051
2048
  createDate(year, month, day) {
2052
2049
  return this.dateAdapter.createDateTime(year, month, day, this.dateAdapter.getHours(this.value), this.dateAdapter.getMinutes(this.value), this.dateAdapter.getSeconds(this.value), this.dateAdapter.getMilliseconds(this.value));
2053
2050
  }
2051
+ createDateTime(value) {
2052
+ if (Object.values(value).some(isNaN)) {
2053
+ return null;
2054
+ }
2055
+ return this.getValidDateOrNull(this.dateAdapter.createDateTime(value.year, value.month - 1, value.date, value.hours, value.minutes, value.seconds, value.milliseconds));
2056
+ }
2054
2057
  correctCursorPosition() {
2055
2058
  if (this.selectionStart && this.separatorPositions.includes(this.selectionStart)) {
2056
2059
  this.selectionStart = this.selectionStart - 1;