<script>
$("#btn").on("click", function () {
var ddl = $(".e-dropdownlist"); //gets the element of every dropdownlist
var dp = $(".e-datepicker"); //gets the element of every datepicker
//Setting selectedIndex to -1 for every dropdownlist control
for (i = 0; i < ddl.length; i++) {
$(ddl[i]).data("ejDropDownList").setModel({ selectedIndex: -1 })
}
//Setting value to null for every datepicker control
for (i = 0; i < dp.length; i++) {
$(dp[i]).data("ejDatePicker").setModel({ value: null })
}
});
</script> |