Solved

using jquery

Posted on 2013-12-03
1
176 Views
Last Modified: 2013-12-13
How would I use this on server control?

<label for="from">From</label>

<input type="text" id="txtfrom" name="from" runat="server">

<label for="to">to</label>

<input type="text" id="txtto" name="to" runat="server">

See this
0
Comment
Question by:VBdotnet2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 500 total points
ID: 39694608
You need to add the following script in your ASP.Net page

<script>

  $(function() {

    $( "#<% this.FromTextBox.Id %>" ).datepicker({

      defaultDate: "+1w",

      changeMonth: true,

      numberOfMonths: 3,

      onClose: function( selectedDate ) {

        $( "#" ).datepicker( "option", "minDate", selectedDate );

      }

    });

    $( "#<% this.ToTextBox.Id %>" ).datepicker({

      defaultDate: "+1w",

      changeMonth: true,

      numberOfMonths: 3,

      onClose: function( selectedDate ) {

        $( "#<% this.FromTextBox.Id %>" ).datepicker( "option", "maxDate", selectedDate );

      }

    });

  });

  </script>

Open in new window


And simply add two asp.net text boxes on your page with name ToTextBox and FromTextBox

Regards,
Chinmay.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question