asp.net - jquery datepicker not focussed after date is chosen, after postback datepicker doesn't work -


everytime user selects date datepicker reason instead of staying focused on date picker in scrolls top of page.

heres function located @ bottom of asp.net page under

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

this code.

<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> 

and on postback datepickers stop working. example have dropdownlist causes postback , if user uses drop downlist datepickers stop working

i'm not sure you're page done loading before datepicker() initialized...putting @ bottom of page kind of works, i've stopped myself , switched to:

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

my answer not much, assures page done screwing around before datepicker started up.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -