clear section of dropdown( with and out check box inside) and datepicker
--------------------------------------------------------------------------
function GetClearSelction() {
$find('cbCustomer').clearSelection();--------> this for combo box
var items = $find('cbCustomer').get_checkedItems();
var i = 0;
while (i < items.length) {---> these five lines for combo box inside check box
items[i].uncheck();
i++;
}
$find('cbZone').clearSelection();
this is for datepicker
------------------------ var fullDate = new Date() var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; var twoDigitMonth = ((fullDate.getMonth().length + 1) === 1) ? (fullDate.getMonth() + 1) : '0' + (fullDate.getMonth() + 1); var currentDate = fullDate.getDate() + " " + months[fullDate.getMonth()] + " " + fullDate.getFullYear(); document.getElementById("FrmDt_dateInput").value = currentDate; document.getElementById("ToDt_dateInput").value = currentDate; } this is button <input type="button" onclick="GetClearSelction();" value="Clear" />
------------------------ var fullDate = new Date() var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; var twoDigitMonth = ((fullDate.getMonth().length + 1) === 1) ? (fullDate.getMonth() + 1) : '0' + (fullDate.getMonth() + 1); var currentDate = fullDate.getDate() + " " + months[fullDate.getMonth()] + " " + fullDate.getFullYear(); document.getElementById("FrmDt_dateInput").value = currentDate; document.getElementById("ToDt_dateInput").value = currentDate; } this is button <input type="button" onclick="GetClearSelction();" value="Clear" />