.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

AjaxControlToolkit.CalendarExtender - highlight current date

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
I have used AjaxControlToolkit.CalendarExtender for calendar in my project.but anyhow I am unable to highlight current date  in calendar control.(Note: Current date I mean is today's date and not the selected date.)e.g.( If today is 15th August 2010, and I have selected 24 August 2010. then when I press calendar icon, I should see 15 august highlighted with different look or same as selected date 24 highlighted in August month of 2010 page in calendar popup.)Please guide me to accomplish the taskThanks in advance for support.

View Complete Post

More Related Resource Links

ajaxtoolkit:CalendarExtender disable the dates which are lessthan current date


 hi frds

i'm using ajaxtoolkit:calenderextender

in this i should not be able to select dates which are lessthan currentdate

is this possible?

how to solve this ?

thank u in advance



CalendarExtender wrong date from database



I'm about to go NUTS :)

I have 2 CalendarExtenders on page. And I want to show the date that I get from SQL SEVER:

select -> SELECT convert(datetime,  begin) as Begin, convert(datetime, end) as End FROM Table

The date field, on base,  is a char(8)  and the record is like YYYYMMDD. That's why I convert it to datetime.

But, on code behind when I do this :

CalendarExtender1.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(2))
CalendarExtender2.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(3)) 

Depend of the date, It's showing minus 1 day on page.

Like: If, on base, the date is 08/12/2010, on page it's showing 07/12/2010.

WHYYYYYYYYYYYY ??????????????? Cry Smile




How to insert the Current date and time in to SQL Table..

Hello Members,              I have create the table as per the following ..create table company(  empname varchar(30),  empid int,  joindate smalldatetime)I tried,insert into table values('Kumar',202, ??????)I want to insert Current date and time into table Company.....Please give me the solution...Thanks.. 

Formatting the date with the CalendarExtender

I must be missing something here.  I use the code below to display a DateTime value, and the time is always displaying, i.e. 7/11/2010 08:10:10. I just want the date.  The Format value doesn't seem to have any effect.    <asp:TemplateField HeaderText="Exp Date" HeaderStyle-Width="100px">   <ItemTemplate>   <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("expirationDate") %>'></asp:TextBox>   <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" Format="MM/dd/yy" />   </ItemTemplate>   </asp:TemplateField>

How to get "Current Date" on SharePoint Designer for Invoice Ageing Data View Report??

Hi Experts, I would like to know how can i get/show "Current Date" in SharePoint Designer ?? Any good tutorial ? FYI, I need this "Current Date" for my Ageing Data View Report, Purpose To offset with "Invoice Receive Date" to get total days of payment payable for the invoice. Please assists, Thanks

how to Update a row with Current system date and add a Prefix to it

Hi Could you please help me out, How to write an update Query to update the row with the current system date and I need to add a prefix like "ABC_" The Column is in VARCHAR datatype. I need it like  ABC_System date update Table1 set column1= getdate() updates the row when i add prefix,it throws Syntax error converting datetime from character string.   Thanks in advance Shan

how to get the current date and time using sharepoint designer workflows

hi, how to send an email using sharepoint designer workflow when an item equals to end time. How to get the current date and time.I am able to capture the date but not the time  the time is showing as 12:00:00 AM. First i have create an variable  and storing the date and time in that variable and i am comparing the variable value with end time. If both are equal then i want to send an mail to attendees

How to display the date only till current date in ajax calendar extender .

Hi,1) How can i display the date only till current date in ajax calendar extender ?2)How to validate the date in one TextBox with the Date in another TextBox ?    Please Help me ...

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" />

How do I populate a Textbox with the current system date and time?

Hello, all! First I am a complete newbie and I have a project that I need help with. I am building a Windows form application to keep track of servers and their last maintenence date. I have a simple one table SQL Express database (empty). One of my rows is set up to store the date and time. But first, I need to know how to auto populate the system date and time to a TextBox control everytime someone opens the application. I have tried using the System.DateTime method in the Textbox event properties as a string but I am doing something wrong. Thanks in advance for your help and guidence!

return records based on current date?


I tried finding a QA which already addressed this idea, but with no luck. Sorry if it's been addressed before.


I have a table where sales pricing is managed; it contains history of pricing where every price record has an 'effective date'. Currently when a user needs the 'active' price for a customer/item combination, the table is queried by the record that has the most recent 'EffectiveDate' before GETDATE(). Here is the def for table 'tim_PriceSheet'

ItemKey int, not null

EffectiveDate datetime, notnull

CurrID varchar(3)

ListPrice decimal (15,5)

The primary key is set on ItemKey, EffectiveDate

Sample Data:


ItemKey	EffectiveDate	    CurrID	ListPrice
45	2010-07-01 00:00:00.000	CAD	100.00000
45	2010-09-14 00:00:00.000	CAD	110.00000
45	2010-10-01 00:00:00.000	CAD	112.00000
63	2010-09-01 00:00:00.000	CAD	45.00000
63	2010-09-01 00:00:00.000	USD	45.00000
63	2010-09-18 00:00:00.000	CAD	40.00000
63	2010-10-01 00:00:00.000	USD	40.00000
63	2010-10-15 00:00:00.000	CAD	41.00000
63	2010-10-21 00:00:00.000	USD	41.00000

My challenge is this:

I want to return a record set which shows the current price for each distinct item and currency code; in the example below the result would be based on the date being September 16, 2010

Using Now() to get the current date in a MDX expression




Could anyone please let me know how I could use the VBA function Now() to get the current time and assign it to the (year-month) hierarchy?

I need this for a report which retrieves amount collected in the past 24 months from the current date.

I have read that I could use the VBA functions but I am not sure how to assign it to the time dimension hierarchy and then use the LASTPERIODS function to get the past 24 months of data.


Any help would be greatly appreciated.



Pagelaod - fill in text box with current date


I want to fill in a text box with current date when the page is loading in the format of:



today is 11 October 2010

fill in as


How to remove weekend days from current row date and Previous row date ?


column0    Column1                     ResultColumn

1              Mon, 07/12/2002           0 days

2              fri, 11/12/2002              4 days

3              mon, 14/12/2002           1 days

Thanks & Regards, PSWASULE

SharePoint DateTime control returning current date when no date is selected

In WSS 3.0, I am using sharePoint DateTime control. I retrieve the date selected by the user using SelectedDate property of the sharePoint DateTime control.

The issue is that even when the user has not selected any date in the sharePoint DateTime control, the SelectedDate property of the sharePoint DateTime control returns current date. I guess it should return DateTime.MinValue or null when the user has not selected any date in the sharePoint DateTime control.

Kindly clarify.


CalendarExtender date checker


I have read many forums to see if I could find a solution and there hasn't been anything that is what I need.  I have an asp:calendar that you select a date on there and a panel pops up.  On the panel, the start date and end date are filled with the selected date from the asp:calendar.  The end date field has the CalendarExtender.  When you open it, the selected date on there is the same as from the asp:calendar which is good.  What I need is to tweak my javascript to check to make sure that the user picks a date after the selected date from the asp:calendar.  so if they pick 11/4/2010 as a start date, the end date cannot be fore 11/4/2010.  Only anything after that.  Not todays date(ex. 10/22/2010).

codebehind for my asp:calendar sending the dates

        'post date in panel
        If e.Day.IsSelected Then
            txtSDate.Text = e.Day.Date
            txtEndDate.Text = e.Day.Date
        End If
JavaScript and asp code
        <script type="text/javascript">
            function checkDate(sender, args) {
                if (sender._selectedDate < new Date()) {
                    alert("You cannot select a day earlier than today!&q
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