ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Implement Bootstrap DatePicker and highlight current Date using jQuery in ASP.Net<p>Hi <a class="username" rel="pdepirro"> pdepirro</a>,</p> <p>Refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <div class="demo_block"> <pre class="brush: html">&lt;div&gt; &nbsp;&nbsp;&nbsp; &lt;input id=&#34;txtDate&#34; type=&#34;text&#34; class=&#34;form-control&#34; placeholder=&#34;Availability Date&#34; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; runat=&#34;server&#34; /&gt; &nbsp;&nbsp;&nbsp; &lt;asp:Button Text=&#34;Submit&#34; runat=&#34;server&#34; OnClick=&#34;btnSubmit_Click&#34; /&gt; &nbsp;&nbsp;&nbsp; &lt;!-- Bootstrap --&gt; &nbsp;&nbsp;&nbsp; &lt;script type=&#34;text/javascript&#34; src=&#39;https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js&#39;&gt;&lt;/script&gt; &nbsp;&nbsp;&nbsp; &lt;script type=&#34;text/javascript&#34; src=&#39;https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js&#39;&gt;&lt;/script&gt; &nbsp;&nbsp;&nbsp; &lt;link rel=&#34;stylesheet&#34; href=&#39;https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css&#39; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; media=&#34;screen&#34; /&gt; &nbsp;&nbsp;&nbsp; &lt;!-- Bootstrap --&gt; &nbsp;&nbsp;&nbsp; &lt;!-- Bootstrap DatePicker --&gt; &nbsp;&nbsp;&nbsp; &lt;link rel=&#34;stylesheet&#34; href=&#34;https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css&#34; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#34;text/css&#34; /&gt; &nbsp;&nbsp;&nbsp; &lt;script src=&#34;https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.js&#34; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#34;text/javascript&#34;&gt;&lt;/script&gt; &nbsp;&nbsp;&nbsp; &lt;!-- Bootstrap DatePicker --&gt; &nbsp;&nbsp;&nbsp; &lt;script type=&#34;text/javascript&#34;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(function () { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(&#39;[id*=txtDate]&#39;).datepicker({ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; changeMonth: true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; changeYear: true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; format: &#34;dd/mm/yyyy&#34;, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; autoclose: true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; immediateUpdates: true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; todayHighlight: true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; language: &#34;tr&#34; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }); &nbsp;&nbsp;&nbsp; &lt;/script&gt; &lt;/div&gt;</pre> </div> <p><span style="text-decoration: underline;"><strong>Code</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void btnSubmit_Click(object sender, EventArgs e) { string dt = Request.Form[txtDate.UniqueID]; ClientScript.RegisterStartupScript(this.GetType(), &#34;alert&#34;, &#34;alert(&#39;Selected Date: &#34; + dt + &#34;&#39;);&#34;, true); }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Dim dt As String = Request.Form(txtDate.UniqueID) ClientScript.RegisterStartupScript(Me.GetType(), &#34;alert&#34;, &#34;alert(&#39;Selected Date: &#34; &amp; dt &amp; &#34;&#39;);&#34;, True) End Sub</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://i.imgur.com/ACfMEgW.gif" alt="" width="263" height="418" /></p>https://www.aspforums.net:443/Threads/571073/Implement-Bootstrap-DatePicker-and-highlight-current-Date-using-jQuery-in-ASPNet/https://www.aspforums.net:443/Threads/571073/Implement-Bootstrap-DatePicker-and-highlight-current-Date-using-jQuery-in-ASPNet/Mon, 19 Aug 2019 02:14:19 GMT