@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.
@@ -1809,10 +1809,7 @@ class McDatepickerInput {
1809
1809
  this._value = null;
1810
1810
  return setTimeout(() => this.control.updateValueAndValidity());
1811
1811
  }
1812
- if (Object.values(date).some(isNaN)) {
1813
- return;
1814
- }
1815
- const newTimeObj = this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
1812
+ const newTimeObj = this.createDateTime(date);
1816
1813
  if (!newTimeObj) {
1817
1814
  this.lastValueValid = false;
1818
1815
  this._value = null;
@@ -2241,7 +2238,7 @@ class McDatepickerInput {
2241
2238
  else {
2242
2239
  return null;
2243
2240
  }
2244
- return this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
2241
+ return this.createDateTime(date);
2245
2242
  }
2246
2243
  getDefaultValue() {
2247
2244
  const defaultValue = this.value || this.dateAdapter.today();
@@ -2456,6 +2453,12 @@ class McDatepickerInput {
2456
2453
  createDate(year, month, day) {
2457
2454
  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));
2458
2455
  }
2456
+ createDateTime(value) {
2457
+ if (Object.values(value).some(isNaN)) {
2458
+ return null;
2459
+ }
2460
+ return this.getValidDateOrNull(this.dateAdapter.createDateTime(value.year, value.month - 1, value.date, value.hours, value.minutes, value.seconds, value.milliseconds));
2461
+ }
2459
2462
  correctCursorPosition() {
2460
2463
  if (this.selectionStart && this.separatorPositions.includes(this.selectionStart)) {
2461
2464
  this.selectionStart = this.selectionStart - 1;