2011-01-25 68 views
0

每次用户从我的datepicker选择一个日期由于某种原因,而不是集中在日期选择器是在它滚动到顶部这一页。jquery datepicker没有选择日期后重点,后回发datepicker不工作

继承人下

<script> 
    $(function() { 
     $("#<%= pissued1.ClientID %>").datepicker(); 
    }); 
    </script> 

这位于我的asp.net页面底部的功能代码。

<td align="left" colspan="2"> 
    <strong> 
     <asp:Label ID="labdi1" runat="server" Text="*Date Issued:"></asp:Label> 
     <asp:RequiredFieldValidator ID="p1divalidate" runat="server" ControlToValidate="pissued1" 
     ErrorMessage="You Forgot The">*</asp:RequiredFieldValidator><br /> 
     </strong> 
    <asp:TextBox ID="pissued1" runat="server" Width="45%"></asp:TextBox> 
</td> 

以及回发我的datepickers停止工作。例如,我有一个dropdownlist,导致回发,如果用户使用下拉列表,然后日期挑选停止工作

回答

0

我不确定你的页面已完成加载之前,您的datepicker()初始化......把它在页面这类作品的底部,但我已经不再是我本人和切换到:

<script type="text/javascript"> 
$(document).ready(
    function(){ 
    $("#<%= pissued1.ClientID %>").datepicker(); 
} 
); 
</script> 

我的答案是没有多少,但你的日期选择器起动之前,它保证了页面做胡闹。