Hi Shahzaib,
Greetings from Syncfusion support.
Query: I need to clear/reset date on a certain condition using Javascript. how do i accomplish that?
You can clear/Reset the date using Javascript as like below code snippet. We have prepared sample by clear the date in button click. Here we have attached the sample for your reference.
|
<script>
document.getElementById("dynamic").onclick = function () {
var datepickerObject = document.getElementById("date").ej2_instances[0];
//Clear date
datepickerObject.value = null;
//Rest date
//datepickerObject.value = "17/11/2020";
}
</script> |
Kindly check with the above sample. Please get back us if you need further assistance.
Regards,
Ponmani M