Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

textbox date masking

Options
  • 20-06-2007 2:07pm
    #1
    Registered Users Posts: 872 ✭✭✭


    Hi,

    My client has asked to be able to enter a date into a textbox with slashes already in the textbox, i.e. __/__/____ and be able to tab between the day,month and year

    Is there a way to make the slashes undeletable or would it be best to format it with javascript on every keystroke.

    I saw something on the Code Project but it was for a windows form, not an asp.net app.

    Thanks


Comments

  • Registered Users Posts: 590 ✭✭✭dal


    Would it not be better to have 3 different textboxes? You could put undeletable slashes between them if you want. Would make tabbing easier as well.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    The Asp.net Ajax control toolkit has a masked edit control that does exactly what your looking for. The toolkit isn't to everybody's liking but you could use it as a reference for creating your own.


Advertisement