title: how does datepicker work?
body: <p>I am working on a form that requires datepicker in jquery. I am using the normal jquery-ui datepicker library.</p>
  
  <p>Now the problem is it is not working and another problem is I can't show u the script as it is very complex it has various show and hides.</p>
  
  <p>Now can anyone please explain to me how the datepicker works so i can solve the issue.From what i know it appends a div that has the calender and it's structure in it and a hasDatepicker class is appended to the id on which datepicker is set.</p>
  
  <p>and there is one more thing i get a error when clicked on textbox,error is--</p>
  
  <blockquote>
    <p><strong>Uncaught TypeError: Cannot read property 'msie' of undefined jquery-ui.min.js:123</strong></p>
    
    <p><strong>$.extend._generateHTML jquery-ui.min.js:123</strong></p>
    
    <p><strong>$.extend._updateDatepicker jquery-ui.min.js:123</strong></p>
    
    <p><strong>$.extend._showDatepicker jquery-ui.min.js:123</strong></p>
    
    <p><strong>b.event.dispatch jquery-1.9.1.min.js:3</strong></p>
    
    <p><strong>v.handle</strong></p>
  </blockquote>
  
  <p>Please give a simple explanation about datepiceker as i am a very new at these things.I think something is wrong while i do hideing and showing of div or in initilization.</p>
  
  <p>If possible tell me a proper way to do the initilization.</p>