Sunday, October 19, 2014

How to clear the datepicker using javascript

Posted by Unknown  |  No comments


 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  

 <div dir="ltr" style="text-align: left;" trbidi="on">  
 <span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: 14px; white-space: pre-wrap;">clear section of dropdown( with and out check box inside) and datepicker  
 --------------------------------------------------------------------------  
 function GetClearSelction() {  
       $find('cbCustomer').clearSelection();--------&gt; this for combo box  
       var items = $find('cbCustomer').get_checkedItems();  
       var i = 0;  
       while (i &lt; items.length) {---&gt; these five lines for combo box inside check box  
         items[i].uncheck();  
         i++;  
       }  
       $find('cbZone').clearSelection();  
 </span><span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: 13.63636302948px; white-space: pre-wrap;">this is for datepicker</span><br />  
 <span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: 14px; white-space: pre-wrap;">------------------------  
       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  
 &lt;input type="button" onclick="GetClearSelction();" value="Clear" /&gt;</span></div>  

 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  


12:06 AM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top