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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...