Hi if my criteria gets satisfied i need to set the value as blank in input field in the Lightning Web Component.
please help me out for this.
Html:- {dueDate}
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityHi if my criteria gets satisfied i need to set the value as blank in input field in the Lightning Web Component.
please help me out for this.
Html:- {dueDate}
In your javascript file, you need to set the date as null in your if condition. Refer this:-
if (fieldName === 'start-date') {
let checkstartdate = evt.target.value;
console.log("checkenddate == "+new Date(checkstartdate));
if((????Condition) {
this.startDate = null; <ADD_THIS_LINE>
///**Here on UI I want to set the Start date field as Blank**///
this.template.querySelector('start-date').reset();
this.showToast("lllllll");
this.dateValidity = false;
}
else {
this.startDate = evt.target.value;
}
this.startDate = ''
.