Sign in | Join
Last post 05-08-2008 5:27 AM by amirmuthu. 5 replies.
Sort Posts: Oldest to newest Newest to oldest
I need to know how to display only the current month days by avoiding other months days. Is it possible to do it in the event calander????
if you want to show current date when you open calender then set
cal.value=current date
No.. my requirement is to display days belongs to a perticular month by avoiding others months days
Eg; for january, in calander i dont want to display December last week at the begining and the February first week at the end...
If I understand you correctly, I'm not sure how to do it programatically however you could leverage the CSS to "hide" the "other" month. I've edited my CSS file so much that I no longer know what the default is however, open the .css file and find the .calothermonth and set the visibility to hidden. If you add a TD to it this will hide all contents in the table cell.
/* OTHER MONTH */
}
OK, um... where do you add the cal.value=current date???? Can you please elaborate?
Use the following code
<asp:Calendar id="Calendar1" runat="server" Font-Size="10pt" BorderColor="White" BackColor="White" Width="216px" ForeColor="Black" Font-Names="Verdana" Height="188px" BorderWidth="1px" NextPrevFormat="ShortMonth"> <SelectedDayStyle ForeColor="White" BackColor="#CCCCCC"></SelectedDayStyle> <OtherMonthDayStyle ForeColor="White"></OtherMonthDayStyle> <NextPrevStyle Font-Size="8pt" Font-Bold="True" ForeColor="#333333" VerticalAlign="Bottom"></NextPrevStyle> <DayHeaderStyle Font-Size="8pt" Font-Bold="True"></DayHeaderStyle> <TitleStyle Font-Size="10pt" Font-Bold="True" BorderWidth="4px" ForeColor="#333399" BorderColor="Black" BackColor="White"></TitleStyle> </asp:Calendar>