Ajax CalendarExtender [英] Ajax CalendarExtender

查看:81
本文介绍了Ajax CalendarExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用CalendarExtender的原因是我只想禁用整年的星期日,星期一的日期.当我选择星期一或星期日时,它将无法选择,并且我想在那几天应用红色.

我要如何编写代码

请尽早给我解决方法


问候,

D.V. Mallikarjuna Guptha

Hi,

i am using CalendarExtender in that i want to disable only sunday,monday dates only for throught year. when i select monday or sunday date it will not selectable and i want to apply red colour those days.

how i want to write the code

please give me solution as early as possible


Regards,

D.V.Mallikarjuna Guptha

推荐答案

在此处查看如何执行此操作的详细信息:
ASP.NET AJAX日历扩展器提示和技巧 [
Look here for details of how you can do it here:
ASP.NET AJAX Calendar Extender Tips and Tricks[^]

For Red color part, apply CSS.


<script type="text/javascript">
    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))

            }

}

    </script>



在扩展程序文本框中,您必须调用checkdate函数



and on extender textbox you have to call checkdate function

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
         <cc1:CalendarExtender ID="CalendarExtender1"

         runat="server" OnClientDateSelectionChanged="checkDate" TargetControlID="TextBox1" /


这样可以使您更好地了解如何根据任何要求自定义控件.
如果您对开发还有其他疑问,请随时与
http:// www.visiostudio.net 或发送邮件至 info@visiostudio.net


this can give you better idea how to customize you control according to any requirment.
if you have any other question regarding to development .please feel free to contact http://www.visiostudio.net or mail me at info@visiostudio.net


这篇关于Ajax CalendarExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆