.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Highlight multiple dates in calender extender

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net


       I want to highlight the dates corresponding to an event (eg Jan 5-Jan 10) when the user clicks on the calendar extender.. Please advise how this can be done.


ALso is it possible to restrict the the dates that can be selected from the calendar extender?

View Complete Post

More Related Resource Links

how to highlight todays date in calender extender control and how to apply css



how to highlight todays date in  calender extender control popus and  how to apply background color to every cell in calender control

and how to apply css 

<asp:TextBox ID="txt_DueDate" runat="server"></asp:TextBox>
                        <cc1:CalendarExtender ID="cal" runat="server" TargetControlID="txt_DueDate" PopupButtonID="btn_AddDue_Date">
                        <asp:Button ID="btn_AddDue_Date" runat="server" Text="Add_DueDate" OnClick="Add_New_Schedule" />

Calender Extender


Dear All,


I have a calenderextender in a form with the following properties. 

<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID = "txtDeadLine" Format="dd/MM/yyyy" PopupButtonID="btnDate">

So the date selected by the CalenderExtender, the value gets displayed in the txtDeadLine.Text. The problem is when i save the data, the date displayed in the txtDeadLine.text becomes empty and the date is not saved.

How do i save the date using CalenderExtender. I can save the date using the normal Calender.


Help wud be appreciated




Dynamic Ajax Calender Extender

hi i dynamically create Calender Extender and set TargetControl ID and PopupControl Id as dynamically created TextBox Its works fine in windows XP but i tried in Windows 7 return lots of javascript errors value can't be null then something.....   if i didn't add that dynamically created Calendar Extender than no pbm if add then got this errors wats the wrong in windows 7 OS   i m using Vs2008 SP1, Latest Ajax Control Toolkit 

Calender extender and Textbox

Making use of the calender extender and a textbox, but I want by default the present date(todays date) should be what should be in the text box. How do I go about it

Calender control to display dates of one month only

How to make calender control to display dates of one month only like for month of June it shows 25 to 31 of May and 1 to 5 of July. like this-   25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5   I want it to be displayed like this- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30   Any ideas

Taming Multiple Validators on Dates

I have a text box for input of a date.  It has three validators: Required Field - to make sure it's completed Compare - setup to check the data type Compare - setup to check against a limit The second two, as expected, do not fire if the field is empty. If the user keys a stupid date, such as 01/19/0010 the second validator fires as expected.  However, the third validator also fires because the "date" is earlier than the specified limit. Is there any way to prevent the third validator firing, if the second validator has fired (ie once one validator has fired on a particular control, no more validators on that control will fire)? If not, then I guess I'm either going to need to write my own third validator which ignores invalid dates, just like it will ignore an empty field (assuming that the second validator will always be there to take care of invalid formats); or again my own validator but effectively combining the checks of validators two and three (ie checking for format first and then against the limits). I can't be the first person to try and do this.  Anyone?

Calender control. Displaying important dates.

I have a calender control tht you can click on. When you click on a date you see all the events that happens that date. But i want the calender to show what dates have events. I want these dates to have a seperate styling. In the code behind i catch the DayRender event. I have a list will all important dates called "eventDates".   if (eventDates.Contains(e.Day.Date) == true)         {             Calendar1.SelectedDates.Add(e.Day.Date);                       }   if (eventDates.Contains(e.Day.Date) == true)        {            Calendar1.SelectedDates.Add(e.Day.Date);                     }Ive stepped through this method and its triggered once for every day of the month and the dates are addes succesfully. Ive also changed the SelcetedDates property in the mark up, like this: <SelectedDayStyle BackColor="AliceBlue" BorderColor="Red" />But nothing happens. I was hopping that the important dates in the calender would turn into blue background with red borders. I know its sounds horrible but i just wanted to really see if i could make it work. But as i said, nothing ha

calender extender


i want to use a ajax calender extender in which when user clixcks on button caleder show only dates of current month not previous dates.i dont want to disable dates.i should not apper on current month calender.means it should start from 1 and end to 30 or 31

Multiple Dates Query


I need help in creating a query to get info for year selected and previous year of the year selected. Needs to be by quarter(QTR) for both years. QTR1 will always be the month 03, QTR2 month 06, QTR3 month 09, & QTR4 month 12. No computations are required or averaging.

Fields/columns are YEARMONTH stored as mm/dd/yyyy with dd always being 01, ACTUAL_MONTH(float)for all QTRs based on current YEARMONTH selected and one year prior,TARGET_MONTH(float) for all QTRs based on YEARMONTH selected, and PROJECTION_MONTH(float) for all QTRs based YEARMONTH selected.

YEARMONTH (PK, Datetime)

Should look like this if any YearMonth in 2010 was selected
                   Q1 Q2 Q3 Q4
09-Actual      xxx xxx xxx xxx
10-Actual      xxx xxx xxx xxx
10-Target      xxx xxx xxx xxx
10-Projection xxx xxx xxx xxx

How to use an ajax calender extender to a textbox embedded in a wizard.



I have a text box embedded in a wizard control and I want to use the ajax calender extender to populate the textbox in the wizard, but the extender does not find the text box. Please help 

Problem with multiple extender


Hi there,


I'm having a problem with using multiple extenders acting on a single object. Basically, what I'm wanting to do is use the Modal Popup Extender AND the RoundedCornersExtender, both acting on the same panel. When I press on the button, the background "grays out", but the popup doesn't come up.



<form id="form1" runat="server">

<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">


<asp:Button ID="button1" runat="server" Text="Click me" />


<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"

CancelControlID="btnCancel" OkControlID="btnOkay" TargetControlID="button1"

PopupControlID="Panel1" PopupDragHandleControlID="PopupHeader" Drag="True"




<asp:Panel ID="Panel1" runat="server" style="display:none"

Height="200px" Width="300px">

<div class = "popup_Container">

<div class = &qu

Calendar control - disable dates? (calendar extender)


Hi there,

Does anyone know if it is possible to disable some of the dates available for selection.  For example, on opening the calendar all the dates before today are grayed out so that it is only possible to select dates in the future.

On my site I am using two calendar controls which are representing a start date of an event and an end date.  In the end date calendar I would like to disable all dates before the selected start date.

Is anything like this possible with the calendar control?

Thanks for your help,

shortcut for Todays Date in for ajax calender extender



Im using Ajax calender extender in my asp.net page on clicking asp.net button it show calender popup on selecting date its binding on textbox all are working fine,

what i need is i need to set shortcut for todays day.. on clicking button its show calender on press some keyboard it bind todays date in textbox..

How to set shortcut..?

multiple month calender


hello sir.

i want to create calender control with multiple months.

i search so many website. i got a solution using jquery. i didn't get clear solution.

plz any body help me.

it is very urgent to me.


thanking you.


Users can select multiple Dates in Calendar


Hello everyone,

I need some pointers to start on this.

We are building a time off application where three instances of a calendar control will be displayed ( prev - current and next month)   now users can click on various dates accross all three instances and then a count of number of days should be diaplyed in the parent textbox.

To begin with this, i started with adding the dates clicked by the user in Calendar2_SelectionChanged method into a list<> so that i can get the all dates user clicked and then add it to calander's selected dates collection. But this throws an e" object reference not set" error.

Is there anyother way to get all the dates that user click onthe calendar( note the dates doesn't get highlighed so seleteddates doesnt work)

does anyone has a good example for this.

Thank you. 

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend