• AJAX Control Toolkit Calendar(弹出式日历)


    虽然不使用Ajax Contorl Toolkit也能实现该效果,当然如果使用ASP.NET中自带的Calendar要解决异步刷新还要配合UpdatePanel使用。但或许该控件对多数人还是相对容易些。首先对该控件的一些常用属性做一下基本的了解:

    TagetControlID - 一般是TextBox的 ID.

    CSSClass - Name of the Cascading Style Sheet class Use to style the calendar.

    DaysModeTitleFormat - Format string used to display Days Mode Title.The default value is "MMMM,yyyy".(ex:August,2011)

    DefaultView - Gets or sets the default view of the calender.The default value is Days.(可以设置为 Moths or Years)

    Format - Format string used to display the selected date.The default value is "d"(ex:8/11/2011).(and "yyyy年MM月dd日"(2011年8月8日),"yyyy-MM-dd"(2011-8-8))

    PopupButtonID - The ID of a control to show the calendar popup when clicked. If this value is not set, the calendar will pop up when the textbox receives focus. (可以用ImageButton或者image标签来作为PopupButton)         

    PopupPosition - Gets or sets the popup position of the calendar. The default value is BottomLeft.

    SelectedDate - Gets of Sets the data the calendar is initialized with.(初始化的日期)

    TodaysDateFormat - Format string used to display today's date.The default value is "MMMM d,yyyy"

    {说明:弹出式日历是在TargetControl聚焦(Focus)时,弹出,如果设置了PopupButtonID时,点击该控件时弹出日历}

     1   <asp:ScriptManager ID="ScriptManager1" runat="server" />
    2 <div>
    3 <br /><br />
    4 <b>Default Calendar:</b><br />
    5 <asp:TextBox ID="Date1" runat="server"></asp:TextBox>
    6 <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server"
    7 ClearTime="true"
    8 TargetControlID="Date1" SelectedDate="8/08/2011">
    9 </ajaxToolkit:CalendarExtender>
    10 <br /><br />
    11 <b>Calendar with Custom Style and Date Format:</b><br />
    12 <asp:TextBox ID="Date2" runat="server"></asp:TextBox>
    13 <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="Date2" CssClass="MyCalendar" Format="yyyy年MM月dd日">
    14 </ajaxToolkit:CalendarExtender>
    15 <br /><br />
    16 <b>Calendar with associated button:</b><br />
    17 <asp:TextBox ID="Date3" runat="server"></asp:TextBox>
    18 <asp:Image ID="Image1" runat="server" ImageUrl="~/Calendar_scheduleHS.png" />
    19 <ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="Date3" PopupButtonID="Image1" DaysModeTitleFormat="yyyy年,MM月" Format="yyyy-MM-dd" DefaultView="Days">
    20 </ajaxToolkit:CalendarExtender>

      

  • 相关阅读:
    [转]在SQL Server中,关于with as使用介绍
    系统设计笔记【不断更新中】
    关于PHPZend framework2 框架 学习过程。 阅前须知: ZF2中的配置文件是可以静态文件配置来注册和通过相关函数动态注册。 1.EventManager(事件驱动),关于事件驱动,在ZF2相关资料没有详细说明,可以参考ANDROID的事件驱动,MFC的消息响应/事件驱动。
    http://www.mwop.net/blog/248IntroducingtheZF2PluginBroker.html
    Introducing AkrabatSession zf2
    http://127.0.0.1/loginapi/JsonPacket/example/loginrequestdemo.php
    if ($this>getRequest()>isPost()) {
    email
    Quenz_i997_PDA_CHS.rar
    http://team.aiitec.net/?c=inbox
  • 原文地址:https://www.cnblogs.com/January/p/2130913.html
Copyright © 2020-2023  润新知