1

I've got a DatePicker that automatically inserts the date in Mon-dd-yyyy format and, like so many others, it breaks if an improper format (e.g. monddyyyy, yyyy-dd-mm, etc.) is used to enter the date when not in read-only mode.

I want to take DatePicker and have it check to see if the date fits the Mon-dd-yyyy format and just spit an error held in a hidden div (there's already one for the date being blank) as opposed to going to a stack trace page.

4
  • jQueryUI datepicker already do that for you. You've messed something up: jqueryui.com/datepicker Commented Aug 18, 2014 at 17:57
  • I'm familiar with how datepicker works; the solution is to put it into read-only mode. However, I want to make it so the user can manually input the data in the field. Instead of spitting a simple error, it goes to a stack trace (very unfriendly to the end user). This is not desired behavior. Commented Aug 19, 2014 at 20:03
  • Then maybe this will help you: stackoverflow.com/questions/7478296/…. Commented Aug 20, 2014 at 4:58
  • How did I miss that? That'll work! Thank you! I'll probably mess around with mask definitions, too. Thank you again! Commented Aug 20, 2014 at 14:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.