Scenario: You have a start date picker and an end date picker and you want a function that will clear either based on passing the id. While I know this works:
when we try to pass the id to a function something gets lost in the translation. Is there any way to do something like:
var StartDatePicker = $find("<%= dpStartDate.ClientID %>");
StartDatePicker.clear();
when we try to pass the id to a function something gets lost in the translation. Is there any way to do something like:
function clearDatePicker(id) {
var picker = $find(id);
picker.clear();
}
called by:
<a href = "javascript: clearDatePicker('<%= dpStartDate.ClientID %.');">clear</a>