Want to work with us? We're on the lookout for a Magento Developer.

We're hiring

Select Todays Date On CalendarExtender Asp.Net Ajax

Web Bureau

12 September 2013 by Web Bureau

Use the following script:

<script type="text/javascript">
function SelectToday(sender, e) {
var format = sender._todaysDateFormat;
var date = new Date();
var formateddate = date.format(format);
var daycells = $get(sender.get_id() + "_body").getElementsByTagName("DIV");
for (var i = 0; i < daycells.length; i++) {
if (daycells[i].title.indexOf(formateddate) > -1) {
daycells[i].style.backgroundColor = "Grey";
daycells[i].style.color = "White";

Add the following to the calendar extender control: OnClientShown="SelectToday"


Grow your businessStart a project with us today.