jquery datepicker on jquery dialog won't show after cancel is pressed
<p>I've successfully created a jquery datepicker on jquery's dialog box that was loaded via load() function.</p>

<p>I was able to achieved it by overriding dialog box's open event:</p>

<pre><code> open: function (event, ui) {
                    if ($('input.date-picker').length &gt; 0) {
                        $('input.date-picker').datepicker({
                            showOn: "button",
                            buttonImage: "/Content/images/calendar.gif",
                            buttonImageOnly: true
                        });
                        $('input.date-picker').datepicker("refresh");
                    }
                },
</code></pre>

<p>The datepicker successfully show after I press the image button. But I noticed something strange, when I open the dialog, click cancel then open the dialog again and click the calendar image button, the datepicker won't show.</p>

<p>Might help, I've also overriden dialog's close event:</p>

<pre><code>close: function (event, ui) {
                    $('input.date-picker').datepicker("destroy");
                    $(this).dialog("destroy");
                }
</code></pre>

<p>Thanks,
<br />czetsuya</p>
