none
弹出式日历CalendarExtender控件无法向TEXT写入日期值 RRS feed

  • 问题

  •  

    测试结果:在开发环境中正常,部署到IIS6后,加入ajaxToolkit:MaskedEditExtender 后无法向TEXT写入日期值,去掉就正常

    有哪位朋友碰到过类似情况否?????

     

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" AsyncPostBackTimeOut="600" />
        <div>
                                   起始日期 
                            <asp:TextBox ID="TbBeginDate" runat="server" Width="130px"></asp:TextBox>
                            <asp:Image ID="ImgBeginDate" runat="server" ImageUrl="~/Images/Icon/Calendar.png" Width="16px"  />
                            <ajaxToolkit:CalendarExtender
                                ID ="CeBeginDate"
                                runat="server"
                                Format="yyyy-MM-dd"
                                TargetControlID="TbBeginDate"
                                PopupButtonID="ImgBeginDate">
                            </ajaxToolkit:CalendarExtender>
                            <ajaxToolkit:MaskedEditExtender
                                TargetControlID ="TbBeginDate"
                                ID ="MeeBeginDate"
                                runat ="server"
                                MaskType ="Date"
                                Mask ="9999-99-99">
                            </ajaxToolkit:MaskedEditExtender>
                            <ajaxToolkit:MaskedEditValidator
                                ID="MevBeginDate"
                                runat ="server"
                                ControlExtender ="MeeBeginDate"
                                ControlToValidate ="TbBeginDate"
                                EmptyValueMessage =""
                                InvalidValueMessage =""
                                TooltipMessage =""
                                IsValidEmpty ="false" 
                                Display ="Dynamic" >
                            </ajaxToolkit:MaskedEditValidator><br />
                               <asp:TextBox ID="TextBox1" runat="server" Text="a"></asp:TextBox>
        </div>
        </form>
    </body>
    </html>


    2011年9月5日 7:21

答案

  • 请试试这样(粗体字)

           <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1"  runat="server" AsyncPostBackTimeOut="600" />
    
    
    
        <div>
    
    
    
                                   起始日期  
    
                            <asp:TextBox ID="TbBeginDate" runat="server" Width="130px"></asp:TextBox>
                            <asp:Image ID="ImgBeginDate" runat="server" ImageUrl="~/Images/Icon/Calendar.png" Width="16px"  />
                            <ajaxToolkit:CalendarExtender 
                                ID ="CeBeginDate" 
                                runat="server" 
                             Format="yyyy-MM-dd" 
                                TargetControlID="TbBeginDate" 
                                PopupButtonID="ImgBeginDate">
                            </ajaxToolkit:CalendarExtender>
    
                          <ajaxToolkit:MaskedEditExtender 
                                TargetControlID ="TbBeginDate"
                               ID ="MeeBeginDate" 
                                runat ="server"
    
                            ClearMaskOnLostFocus="false"
                                MaskType ="None" 
    
                                Mask ="9999-99-99">
                            </ajaxToolkit:MaskedEditExtender>
    
                            <ajaxToolkit:MaskedEditValidator 
                                ID="MevBeginDate" 
                               runat ="server" 
                              ControlExtender ="MeeBeginDate" 
                                ControlToValidate ="TbBeginDate"
                              EmptyValueMessage ="" 
                            InvalidValueMessage ="" 
                            TooltipMessage ="" 
                             IsValidEmpty ="false"  
                             Display ="Dynamic" >
                          </ajaxToolkit:MaskedEditValidator><br />
    
                           <asp:TextBox ID="TextBox1" runat="server" Text="a"></asp:TextBox>
        </div>
    

    Shadowと愉快なコード達
    2011年9月5日 9:17

全部回复

  • 请试试这样(粗体字)

           <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1"  runat="server" AsyncPostBackTimeOut="600" />
    
    
    
        <div>
    
    
    
                                   起始日期  
    
                            <asp:TextBox ID="TbBeginDate" runat="server" Width="130px"></asp:TextBox>
                            <asp:Image ID="ImgBeginDate" runat="server" ImageUrl="~/Images/Icon/Calendar.png" Width="16px"  />
                            <ajaxToolkit:CalendarExtender 
                                ID ="CeBeginDate" 
                                runat="server" 
                             Format="yyyy-MM-dd" 
                                TargetControlID="TbBeginDate" 
                                PopupButtonID="ImgBeginDate">
                            </ajaxToolkit:CalendarExtender>
    
                          <ajaxToolkit:MaskedEditExtender 
                                TargetControlID ="TbBeginDate"
                               ID ="MeeBeginDate" 
                                runat ="server"
    
                            ClearMaskOnLostFocus="false"
                                MaskType ="None" 
    
                                Mask ="9999-99-99">
                            </ajaxToolkit:MaskedEditExtender>
    
                            <ajaxToolkit:MaskedEditValidator 
                                ID="MevBeginDate" 
                               runat ="server" 
                              ControlExtender ="MeeBeginDate" 
                                ControlToValidate ="TbBeginDate"
                              EmptyValueMessage ="" 
                            InvalidValueMessage ="" 
                            TooltipMessage ="" 
                             IsValidEmpty ="false"  
                             Display ="Dynamic" >
                          </ajaxToolkit:MaskedEditValidator><br />
    
                           <asp:TextBox ID="TextBox1" runat="server" Text="a"></asp:TextBox>
        </div>
    

    Shadowと愉快なコード達
    2011年9月5日 9:17
  • 貌似可以了,谢谢大侠!

    2011年9月6日 10:25