Dear Customer,
Greetings from Syncfusion support.
We have validated your reported query “when I start writing a value, the error is not cleared from the field. any idea for resolve this ?” at our end. We have achieved your requirement with the help of the below code. We have prepared a sample for your reference and it can be available below.
[app.component.html]
<tr>
<td class="e-textlabel">Status</td>
<td colspan="4">
<ejs-dropdownlist id='EventType' name="EventType" class="e-field" data-name="Status" placeholder='Choose Status' [dataSource]='StatusData' [fields]='statusFields' value='{{data.Status}}' (select)="onSelect($event)">
</ejs-dropdownlist>
</td>
</tr>
<tr>
<td class="e-textlabel">Summary</td>
<td colspan="4">
<input id="Subject" autocomplete="off" class="e-field e-input" type="text" value="" name="Subject" (input)="onChange($event)" style="width: 100%" />
</td>
</tr>
<tr>
<td class="e-textlabel">Location</td>
<td colspan="4">
<input id="Location" autocomplete="off" class="e-field e-input" type="text" value="" name="Location" (input)="onChange($event)" style="width: 100%" />
</td>
</tr>
[app.component.ts]
public onSelect(args) {
let alertElement = (document.querySelector('#EventType_Error') as HTMLElement);
if (alertElement) {
alertElement.style.display = 'none';
}
}
public onChange(args) {
if (args.currentTarget.value != '') {
let locationAlert = (document.querySelector('#Location_Error') as HTMLElement);
let subjectAlert = (document.querySelector('#Subject_Error') as HTMLElement);
if (subjectAlert && args.currentTarget.id === 'Subject') {
subjectAlert.style.display = 'none';
} else if (locationAlert && args.currentTarget.id === 'Location') {
locationAlert.style.display = 'none';
}
}
}
Kindly try the above sample and get back to us if you would require further assistance.
Regards,
Ravikumar Venkatesan