Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/orange-eyes-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@db-ux/ngx-core-components": patch
---

DBInput: inserting an empty string doesn't reset/empty date form fields
2 changes: 1 addition & 1 deletion packages/components/scripts/post-build/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export const getComponents = (): Component[] => [
from: 'writeValue(value: any) {',
to:
'writeValue(value: any) {\n' +
'if (!value && (this.type() === "date" ||\n' +
'if (!value && value !== "" && (this.type() === "date" ||\n' +
' this.type() === "time" ||\n' +
' this.type() === "week" ||\n' +
' this.type() === "month" ||\n' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class FormComponent {
this.model.checkbox2 = false;
this.form.get('input')?.setValue('reset');
this.form.get('textarea')?.setValue('reset');
this.form.get('dateinput')?.setValue('reset');
this.form.get('dateinput')?.setValue('');
this.form.get('checkbox')?.setValue(false);
}

Expand Down
Loading