1 Replies - 938 Views - Last Post: 02 February 2012 - 06:13 AM Rate Topic: -----

Topic Sponsor:

#1 cutexxbaby  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 14-June 11

multiple textbox for a ajax calendar control?

Posted 31 January 2012 - 08:50 PM

i have this ajax calendar control, but i click on the btnDate3 it will add another row of the textbox which allow me to select date from the calendar control again, so if i click submit, it will retrieve each textbox date from each row after you Add
so basically a user can click on the Add button then , it will add another row of textbox which have the same function

 <asp:TextBox runat="server" ID="txtDate1" />
            <ajaxtoolkit:calendarextender  runat="server" ID="calExtender1" 
                                        TargetControlID="txtDate1" OnClientDateSelectionchanged="CheckDateEalier" Format="dd/MM/yyyy"/>
 <asp:Button ID="btnDate3" Text="Add" Width="20px" runat="server" />
 <asp:Button ID="submit" Text="Submit" Width="20px" runat="server" />

this is the javascript i use to check the date
 <script type="text/javascript">
    function CheckDateEalier(sender,args) {
        if (sender._selectedDate < new Date()) {
             alert("You cannot select a day before today or today!");
             sender._selectedDate = new Date(); 
             // set the date back to the today
            // sender._textbox.set_Value(sender._selectedDate.format(sender._format))
             sender._textbox.set_Value(null)
         }
     }
</script>


Is This A Good Question/Topic? 0
  • +

Replies To: multiple textbox for a ajax calendar control?

#2 Nakor  Icon User is offline

  • ASP.NET/C# Developer
  • member icon

Reputation: 346
  • View blog
  • Posts: 1,228
  • Joined: 28-April 09

Re: multiple textbox for a ajax calendar control?

Posted 02 February 2012 - 06:13 AM

are you getting an error? Where's your code for creating the extra textboxes and extenders?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1