change text field date using up/down keys

Discussion in 'JavaScript' started by srdva59, Jul 19, 2010.

  1. #1
    hi,
    i looking for a way to change text field date using up/down keys
    i have looking on google but i not find nothing working in both browsers
    any one know something like this?
    thanks for your help
     
    srdva59, Jul 19, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    You need to elaborate. I'm not too sure what you meant by that, but from my understanding, you want to increase/decrease the date in the text field using up/down keys. One way I could think of on javascript is to trigger an onkeydown event. Let's say the user pressed on up key - the javascript key code for the up key is 38, then if it's == 38, then increase the date on the text field, vice versa with the down key. See this for the key code
     
    Rainulf, Jul 19, 2010 IP