great mitra..thanks..TodaysDateFormat="MMMM d yyyy" works for me.
For red color date trying with this on event onclientshown. Not working 100%. working only for the current month page. If date is binded in TextBox it wont work if switched to current month page.
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtSRFrom" PopupButtonID="imgSRFrom" runat="server" OnClientShown="changeCalenderDateColor" TodaysDateFormat="MMMM d yyyy"></asp:CalendarExtender>
function changeCalenderDateColor(sender, args) {
var today = new Date();
var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var dateText = days[today.getDay()] + ', ' + monthNames[today.getMonth()] + ' ' + today.getDate() + ', ' + today.getFullYear();
$("div[title='" + dateText + "']").css("color", "red");
}
Badluck. ajax__calendar_today is included in Sept 2011 AjaxControlToolkit release. We are using 4.1.40412.2 - 2010 version. Couldnt take the risk of updating the version.
This one could help but it shows the selected date as red. Mine requirement is to show only the today's date as red.
swapnil12081...
Member
29 Points
15 Posts
Customize CalendarExtender
Jan 23, 2013 07:41 AM|LINK
Want to remove the comma from the the todays date section of CalendarExtender.
The current date font should be in red color.
Please help. see this image.
https://docs.google.com/file/d/0B1aC7mZ2bb0CZURLMHdqM01ZVnM/edit
Sujeet Saste
Contributor
2998 Points
572 Posts
Re: Customize CalendarExtender
Jan 23, 2013 08:25 AM|LINK
You can remove "," from todays date by giving TodaysDateFormat like shown below :
<ajax:CalendarExtender ID="cal1" runat="server" PopupButtonID="ads" TargetControlID="txt1" FirstDayOfWeek="Monday" DefaultView="Days" Format="dd-MM-yyyy" Animated="true" TodaysDateFormat="MMMM d yyyy" />Now I am looking for current date font.....
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
My Blog
swapnil12081...
Member
29 Points
15 Posts
Re: Customize CalendarExtender
Jan 23, 2013 09:12 AM|LINK
great mitra..thanks..TodaysDateFormat="MMMM d yyyy" works for me.
For red color date trying with this on event onclientshown. Not working 100%. working only for the current month page. If date is binded in TextBox it wont work if switched to current month page.
function changeCalenderDateColor(sender, args) { var today = new Date(); var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var dateText = days[today.getDay()] + ', ' + monthNames[today.getMonth()] + ' ' + today.getDate() + ', ' + today.getFullYear(); $("div[title='" + dateText + "']").css("color", "red"); }chetan.sarod...
All-Star
65829 Points
11163 Posts
Re: Customize CalendarExtender
Jan 24, 2013 02:31 AM|LINK
Hi
You can do this by using the following css class:
ajax__calendar_today .ajax__calendar_day { background-color:red;}http://stackoverflow.com/questions/2330729/how-to-control-style-of-todays-cell-in-asp-net-ajax-calendarextender
http://weblogs.asp.net/karan/archive/2010/09/20/calendar-extender-today-s-date.aspx
http://weblogs.asp.net/karan/archive/2010/09/20/calendar-extender-today-s-date.aspx
http://forums.asp.net/t/1436503.aspx/1
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Sujeet Saste
Contributor
2998 Points
572 Posts
Re: Customize CalendarExtender
Jan 24, 2013 03:03 AM|LINK
Hi, use chetan's code with following modification :
<style type="text/css"> .ajax__calendar_today .ajax__calendar_day { color: red; } </style>As per ypur requirement.
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
My Blog
swapnil12081...
Member
29 Points
15 Posts
Re: Customize CalendarExtender
Jan 24, 2013 05:56 AM|LINK
Thanks chetan and Sujeet.
Badluck. ajax__calendar_today is included in Sept 2011 AjaxControlToolkit release. We are using 4.1.40412.2 - 2010 version. Couldnt take the risk of updating the version.
This one could help but it shows the selected date as red. Mine requirement is to show only the today's date as red.
http://weblogs.asp.net/karan/archive/2010/09/20/calendar-extender-today-s-date.aspx