views:

391

answers:

1

Using meioMAsk plugin is there any way to set up a mask so it will accept valid US date up to today's date

$(#txtContactDate).setMask('us-date');

You can set a date filterusing pre-defined mask 'us-date' but it allows future dates and also allows some invalid dates, like 02/31/2010.

Thanks.

A: 

Have you thought about using the jQuery UI datepicker in conjunction with a custom date validator (validation plugin)? The datepicker gives you a lot of control over what dates are selectable and the validator would ensure that no illegal values were hand entered. I find using the datepicker solves almost all of my problems with invalidly entered dates.

tvanfosson
Thanks for reply/advice I will look into that option
Victor