Insertion of a calendar

ajax , asp.net Nice, France
  • 9 years ago

    Hello all,

     

    I am trying to insert calendars for the start date and end date for my web page.

    This is my piece of code where I used the "Calendar Extender" of the AJAX control toolkit..The calendars being displayed are very crude and i am not able to access different months.Only the current month is being displayed.I could not figure out where the problem is.Can someone help me out?

     

    <asp:FormView ID="fvProjectDetails" runat="server"
        DataKeyNames="ProjectID" DataSourceID="esProjectDetailsDataSource"
        DefaultMode="Edit">
        <HeaderTemplate>
         <span class="textHeader">Step 1. Edit Project Information<br /></span>              
        </HeaderTemplate>
        <InsertItemTemplate>
       <p>
      Title: <br />
    <asp:TextBox ID="txtTitle" runat="server" value=" " Text='<%# Bind("Title") %>' BorderStyle="Solid" BorderWidth="1px" Width="75%" />
                <br />
    Start Date: <br />
    <asp:TextBox ID="txtStartDateI" runat="server" value=""Text='<%# Bind("StartDate") %>' BorderStyle="Solid" BorderWidth="1px" Width="50%" />

    <asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="ico_calendar.gif" AlternateText="Click here to display calendar"/>
    <ajaxToolkit:CalendarExtender ID="calendarStartDate1" EnabledOnClient="true"  runat="server" TargetControlID="txtStartDateI" PopupButtonID="ImageButton1" format="MM/dd/yyyy">
      </ajaxToolkit:CalendarExtender>  
      <br />
     End Date: <br />
    <asp:TextBox ID="txtEndDateI" runat="server" Text='<%# Bind("EndDate") %>' BorderStyle="Solid" BorderWidth="1px"  Width="50%" />     
     <asp:ImageButton runat="Server" ID="ImageButton2" ImageUrl="ico_calendar.gif" AlternateText="Click here to display calendar"/>
     <ajaxToolkit:CalendarExtender ID="calendarEndDate1" EnabledOnClient="true"  runat="server" TargetControlID="txtEndDateI" PopupButtonID="ImageButton2" format="MM/dd/yyyy">
     </ajaxToolkit:CalendarExtender>   
     <br />

     

    -Thanks,

    Sravani 

  • 9 years ago

    Hi,

    What version of the AJAX toolkit are you using?

    I have used calendars with AJAX and never experienced any problems at all.

    Si

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is anticipated with distaste, performed with reluctance, and bragged about forever.” - Dan Kaminsky