Here is a simple way to highlight Today's Date in ASP.NET AJAX Calender Extender using JavaScript.
Code for .aspx page:
<
asp:TextBox
ID
=
"DateTextBox"
runat
=
"server"
/>
<
asp:Image
ID
=
"Image1"
runat
=
"server"
ImageUrl
=
"Calendar_scheduleHS.png"
/>
<
ajaxToolkit:CalendarExtender
ID
=
"CalendarExtender1"
runat
=
"server"
TargetControlID
=
"DateTextBox"
PopupButtonID
=
"Image1"
OnClientShowing
=
"CurrentDateShowing"
>
</
ajaxToolkit:CalendarExtender
>
If you notice in the above code I am calling Javascript function "CurrentDateShowing" on the CalendarExtender which set’s Today’s Date.
Here's the Css Style sheet:
.cal_theme .ajax__calendar_active
{
color: Red;
font-weight: bold;
background-color: #ffffff;
}
Here's the JavaScript:
<
script
type
=
"text/javascript"
>
function CurrentDateShowing(e)
{
if (!e.get_selectedDate() || !e.get_element().value)
e._selectedDate = (new Date()).getDateOnly();
}
</
script
>
That's it !!!!
Now try to run the page (view page in browser) - Once you click on calender image button, you would see Today’s date is highlighted.
thanks again
thanks again
i am using AjaxControlToolkit.dll Version 4.5.7.1213
How can i fix this ?
This is the code Link : http://stackoverflow.com/questions/29938899/ajaxcontroltoolkit-calendarextender-not-working-after-publish
i am using AjaxControlToolkit.dll Version 4.5.7.1213
How can i fix this ?
This is the code Link : http://stackoverflow.com/questions/29938899/ajaxcontroltoolkit-calendarextender-not-working-after-publish