@indice/ng-components 0.2.173-beta.76 → 0.2.173-beta.78

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.
@@ -1154,14 +1154,15 @@ class DatepickerComponent {
1154
1154
  return array.slice((page_number - 1) * this.yearsPerPage, page_number * this.yearsPerPage);
1155
1155
  }
1156
1156
  getDateFromInput() {
1157
- if (this.dateInput?.nativeElement.value !== '' && !this.inline) {
1158
- if (!this.dateInput?.nativeElement.value) {
1159
- this.value = undefined;
1160
- if (this.onChange$) {
1161
- this.onChange$(this.value);
1162
- }
1163
- return;
1157
+ if (!this.dateInput?.nativeElement.value || this.dateInput?.nativeElement.value === '') {
1158
+ this.value = undefined;
1159
+ this.valueChange.emit(this.value);
1160
+ if (this.onChange$) {
1161
+ this.onChange$(this.value);
1164
1162
  }
1163
+ return;
1164
+ }
1165
+ if (this.dateInput?.nativeElement.value !== '' && !this.inline) {
1165
1166
  var dateParts = this.dateInput?.nativeElement.value.split("/");
1166
1167
  let dateInGrFormat = new Date(+dateParts[2], dateParts[1] - 1, +dateParts[0], 3, 0, 0);
1167
1168
  if (dateInGrFormat.toString() !== 'Invalid Date') {