How to make calendar that are showing when click on textBox? RRS feed

  • Question

  • User1207526649 posted

    Hello everybody

    I want to help me;
    I'm developing page by using ASP.NET which including ( master page) and (calendar.aspx )file and the programing language is ( VB.NET )

    I want to create Calendar when I click the textbox the calendar will be showing at the following sample of the picture:

    Sunday, July 30, 2017 6:28 AM

All replies

  • User2103319870 posted

    You could use Jquery DatePicker like given below

     <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
                <link rel="stylesheet" href="https://resources/demos/style.css" />
                <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
                <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
                    $(function () {
                        $('#' + '<%= Textbox1.ClientID %>').datepicker(
                                changeMonth: true,
                                changeYear: true,
                                inline: true
                <asp:TextBox ID="Textbox1" runat="server"></asp:TextBox>
    Sunday, July 30, 2017 4:18 PM
  • User2103319870 posted

    Another option is to use AjaxControlToolkit CalendarExtender control

      <asp:ScriptManager ID="ScriptManager2" runat="server"></asp:ScriptManager>
                <asp:TextBox ID="txtDate" runat="server" ReadOnly="true"></asp:TextBox>
                <asp:ImageButton ID="imgPopup" ImageUrl="images/calendar.png" ImageAlign="Bottom"
                    runat="server" />
                <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="imgPopup" TargetControlID="txtDate" />

    You can refer this article for more details

    Sunday, July 30, 2017 4:28 PM