repeating calendar

cSmokeStik8

New Member
Is it possible to repeat calendars dynamically in the same page... for example, user select say a series of 4 months from the dropdown (March-June). Once they press submit, they should be able to see all the 4 months one below the other.<BR><BR>I managed to get for single month, but I could not repeat the calendar. I am passing the following values<BR><BR>dim numberofmonths 'this will give me the total number of months, so according to my example above its 4 month<BR><BR>Then I am using visibledate to get only the required month and on the calendar property I am using ShowNextPrevMonth=false<BR><BR>My question is how do i repeat a calendar using different ids<BR><BR>ThanxYou could make a datalist with calander controls in it. It would be a little complex but that was one way I was thinking you could do it.<BR><BR>MorganI could not get that, could you please illustrate for me the basics<BR><BR>Thanx<BR><BR>Here is a small example of what you would need to do, you would need to bind X number of elements into the datalist, one for each month you want to show. <BR><BR><asp:datalist id="dlMyDataList" runat="server" ><BR> <ItemTemplate><BR> <asp:calander><BR> </ItemTemplate><BR></asp:datalist>I managed to get this done<BR><BR> <asp:DataList id="DataList1" runat="server"<BR> BorderColor="black"<BR> CellPadding="3"<BR> Font-Name="Verdana"<BR> Font-Size="8pt"><BR><BR><BR> <HeaderTemplate><BR> Calendars<BR> </HeaderTemplate><BR> <BR> <ItemTemplate><BR> <td> <asp:Calendar id='Calendar1' runat="server" <BR> SelectionMode="None" <BR> ShowGridLines="True"<BR> ShowNextPrevMonth="False"<BR> FirstDayOfWeek="Saturday"<BR> ondayrender="Calendar1_DayRender"<BR> Width="400px"<BR> DayStyle-Height="50px"<BR> Font-Name="verdana"<BR> Font-Size="8"<BR> VisibleDate="11/12/2003"><BR><BR> </asp:Calendar> </td><BR> </ItemTemplate><BR> <BR> </asp:DataList><BR><BR><BR>But I need different visibledate for each calendar and different Ids for the calendar.How could I possibly do that<BR><BR>Thanx for your time<BR>NashEach calander will actually have its own id onces its bound into the datalist and the page is run but you need some speical code to handle it. It depends on what you want to do with the data your getting from the control but here is some code which might help make it clearer for you.<BR><BR>Dim dliCalander as DataListItem<BR><BR>For each dliOption in dloption.Items<BR> Dim calMyCalendar as calendar<BR> calMyCalendar = dliCalendar.FindControl("Calendar1")<BR> 'You can do manipulate this particular calander how ever you want<BR> calMyCalendar.FirstDayOfWeek = "Monday"<BR>next
 
Back
Top