I realized my own mistake.
I should be passing the two events in the same method call

    $("txt").datepicker({onSelect: function()
{$("txt").datepicker('destroy');}, onClose: function()
{$("txt").datepicker('destroy');}});
    $("txt").datepicker('show');

Luckily I looked at the code ui.datepicker.js and realized it, I think
there are very few examples out there about how to use each settings
and some of it is learning curve as well. I still have to see why no
one has yet asked the question about why we need to override onSelect
in asp.net for validation control error. I  think there is also that
error of parent tag cannot be modified I will post two new issues I am
facing at least it will help others like me who are stumbling with
cross browser issues.


On Sat, Jul 11, 2009 at 12:54 AM, Jay<[email protected]> wrote:
>
> Here is my code snippet
>    $("#txt").datepicker({onSelect: function() {$("txt").datepicker
> ('destroy');}});
>    $("#txt").datepicker({onClose: function() {$("txt").datepicker
> ('destroy');}});
>
>
>
> I need to override the onSelect due to the bug in IE with respect to
> asp.net validation error. I am destroying the datepicker in both
> events as I do not want the datepicker to display when my cursor moves
> to the textbox attached to datepicker and I am using an external
> button as I do not  wish to use the ( showon:button option buttontext
> etc.)
>
>
> Thanks in advance
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to