Enabling only one week in ajax calendar extender

Last Reply 6 days ago By AnandM

Posted 7 days ago

HI Can anyone help me, i only want to enable one week in ajax calendar extender , it was simple in asp calendar control, how to do it in ajax calendar extender. 

like i only want to enable sundays in calendar

You are viewing reply posted by: AnandM 6 days ago.
Posted 6 days ago

Hi Mudassirk7,

Unfortunately there are no server side events attached to the Ajax CalendarExtender like ASP.net Calendar. Ajax CalendarExtender is attached with client side events like OnClientDateSelectionChanged and etc.

So you need to do workaround for achieving the task and for that i have already provided solution to you in my previous reply.


and you can achieve your requirement with jquery datepicker.

Refer below sample code.


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <form id="form1" runat="server">
        <input type="text" id="txtSundays" />
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css"
            type="text/css" media="all" />
        <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css"
            type="text/css" media="all" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"
        <style type="text/css">
            .ui-datepicker-week-end a.ui-state-default
                color: green;
        <script type="text/javascript">
            $(function () {
                var date = new Date();
                    autoclose: true,
                    changeMonth: true,
                    changeYear: true,
                    changeDate: true,
                    minDate: new Date(),
                    beforeShowDay: function (date) {
                        return [date.getDay() === 0, ''];


I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html?aff_id=108