Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends

Actually what is my problem is i want to show only past 4 week date not more than past 4 week date using Ajax Calender Extender so how is it possible anyone suggest me to show only past 4 week calender where weekstart from Wednesday and weekend on Tuesday . Thanks in advance


C#
<script type="text/javascript">
       function CheckWeekEndDay(sender, args) {
           var selecteddate = new Date(sender._selectedDate);
           if (selecteddate.getDay() != 2) {
               alert("Please Select a Valid Day");
               sender._textbox.set_Value('');
               return false;
           }
       }

       function onCalendarShown() {
           var cal = $find("calenddate");

           for (var i = 0; i < cal._daysBody.rows.length; i++) {
               var row = cal._daysBody.rows[i];

               for (var j = 0; j < row.cells.length; j++) {
                   if (j != 2) {
                       row.cells[j].setAttribute("class", "disablecal");
                   }
               }
           }
       }
   </script>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900