views:

313

answers:

1

Is there a jQuery method or workaround that someone has found that will not let the user type anything but dd/mm/yyyy in a textbox ?

Thanks

+1  A: 

A masked control will prevent anything but valid input from being entered: http://digitalbush.com/projects/masked-input-plugin/

Or you could try jquery validation, it is one of the most popular validation frameworks: http://docs.jquery.com/Plugins/Validation

BrokeMyLegBiking
Both Good Resources, but is there anyway to force the dd/mm positions? Essentially I would want it to not allow this:23/04/2010But Allow This:04/23/2010
Seth Duncan
hmm. You could add both a validation method which tests for valid dates and a mask.
BrokeMyLegBiking