title: jQuery UI datepicker reinitialize after ajax call
body: <p>I'm using Yii and it's jQuery UI Datepicker widget.</p>
  
  <p>I use it in CGridView filtering options. When CGridView finishes ajax call it will call <code>afterAjaxUpdate</code> event.</p>
  
  <p>Problem is that I have this JUI Datepicker with custom settings all around my web, so I can't just do <code>$('.picker').datepicker();</code> because all previous options will be lost.</p>
  
  <p>Is there any way to reinitialize JUI Datepicker with same options?</p>
  
  <p><strong>html.php | extends CHtml</strong></p>
  
  <pre><code>public static function datePicker($options) {
     return Yii::app()-&gt;controller-&gt;widget(
          'zii.widgets.jui.CJuiDatePicker',
          CMap::mergeArray(
              [
                  'class' =&gt; 'picker',
              ],
              $options
          ),
          true
      );
  }
  </code></pre>
  
  <p><strong>view.php</strong></p>
  
  <pre><code>$this-&gt;widget(
       'ext.GridView',
       [
           'columns' =&gt; [
               [
                    'name' =&gt; 'date',
                    'filter' =&gt; Html::datePickerField([
                        'name' =&gt; 'Model[date]',
                    ]),
               ],
           ],
       ]
  );
  </code></pre>