How to dynamically create calendars

The Hack Masta

New Member
I just want the calendar component to show me on month only. Not like how it works now where we have the option to scroll through the months.<BR>And next to each date of the month I need to have a checkbox, so that users can select multiple days.<BR><BR>The purpose of this is to let the users select the number of days in the provided month that he will be going on leave.<BR><BR>How is it possible?You can change the NextMonthText and PrevMonthText attributes to "".<BR><BR>You also want to make your own "OnDayRender" method to your own:<BR>Change the brackets to greater thans and less thans...<BR><BR>' CODE BELOW<BR><BR>Private Sub calTest_DayRender(sender As Object, e As System.Web.UI.WebControls.DayRenderEventArgs) <BR> e.Cell.Text = Day(e.Day.Date)<BR> e.Cell.Text &= "[br]"<BR> e.Cell.Text &= "[input type=checkbox value=http://aspmessageboard.com/archive/index.php/1]"<BR> e.Cell.Text &= " check me!"<BR>End Sub <BR><BR>[!-- HTML BELOW --]<BR><BR> [asp:Calendar <BR> ID="calTest" <BR> Runat="server" <BR> OnDayRender="calTest_DayRender" <BR> NextMonthText=""<BR> PrevMonthText=""<BR> /]<BR>Actually, I just realized there is a ShowNextPrevMonth attribute of the asp:calendar control. You can set this to False instead of making the NextMonthText and PrevMonthText = "".
 
Back
Top