With JS add default date on TextBox
<pre><code>&lt;asp:TextBox ID="txtDate" runat="server" AutoPostBack="true" OnTextChanged="txtDate_TextChanged"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p>how can with Jquery add default date. I do not know where and when to call this code:</p>

<pre><code>function addDefaultDate() {
    if ($('#txtDate').val().length == 0) {
        var now = new Date();
        $('#txtDate').text(now.getDate() + '.' + now.getMonth() + '.' + now.getYear());
    }
}
</code></pre>
