Jump to content

UniDateTimePicker OnKeyDown


dionel1969

Recommended Posts

Hello !!!

 

I have a UniDateTimePicker on a form, and because it does not have the event OnKeyDown I trying to do via JS events. I did the following to simulate "click on the button called btnRefresh":

 

function OnKeydown(sender, e)
{
 if (e.keyCode == 13)
  {
   btnRefresh.click();
  }
}

 

What I'm doing wrong???

post-125-0-99338700-1311019923_thumb.png

Link to comment
Share on other sites

You can't call click method of a button.

 

function OnKeydown(sender, e)
{
 if (e.getCharCode()==13) {
  ajaxRequest(sender, 'MyClick');
 }
}

 

Monitor ajax event on server side.

 

One question: Sender is DateTimePicker or Form??? Because if it is DateTimePicker I have not any event associated with it. The event is associated with button named btnRefresh. So the request must looks like:

 

ajaxRequest(btnRefresh, 'btnRefreshClick');

 

 

Or I'm wrong????

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...