How to set calendar date from javascript
<p>when user enters ddMMyy or ddMMyyyy.I want to convert it into dd/MM/yyyy format. To achieve this i
have written a javascript. It works fine but when i focus on textbox again it doesnt show selected date
as javascript converted date(i.e it doesnt fire event when i manually change the date of the textbox).
How to make calendar control to select the date after calling "ConvertToDate" function?</p>

<pre><code>&lt;script type="text/javascript"&gt;
        function ConvertToDate(txtCnt) {
            try {
                txtVal = txtCnt.value;
                var dd = txtVal.charAt(0).toString() + txtVal.charAt(1).toString();
                var MM = txtVal.charAt(2).toString() + txtVal.charAt(3).toString();
                var year = txtVal.substring(4);
                if (year.length == 2) year = "20" + year;
                var jsDate = new Date();
                txtCnt.value = dd + "/" + MM + "/" + year;

            } catch (e) {

            }
            return false;
        }
    &lt;/script&gt;


&lt;asp:TextBox ID="txtFromDt" runat="server" onblur="return ConvertToDate(this)" Width="80px"&gt;&lt;/asp:TextBox&gt;
    &lt;cc1:CalendarExtender ID="txtFromDt_CalendarExtender" runat="server" CssClass="cal_Theme1"
        Format="dd/MM/yyyy" Enabled="True" TargetControlID="txtFromDt" /&gt;
</code></pre>
