开发者

How to disable/strikeout previous date using AjaxToolkit CalenderExtender in asp.net 3.5

开发者 https://www.devze.com 2023-03-21 23:40 出处:网络
In my project, I开发者_开发技巧 have used CalenderExtender (which comes with AJAX Control Toolkit) in my webpages.

In my project, I开发者_开发技巧 have used CalenderExtender (which comes with AJAX Control Toolkit) in my webpages.

Now, I want my calender to strikeout or disable the previous dates.

How can I do it in CalenderExtender?


Please use the js as follow to Strike Out the Past Days:

function checkDate(sender, args) {
            if (sender._selectedDate < new Date()) {
                alert("You cannot select a day earlier than today!");
                sender._selectedDate = new Date();
                // set the date back to the current date
                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
        }
0

精彩评论

暂无评论...
验证码 换一张
取 消