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.

bignose
  • 30,281
  • 14
  • 77
  • 110
MrSchism
  • 43
  • 7
  • jQueryUI datepicker already do that for you. You've messed something up: http://jqueryui.com/datepicker/ – Zentoaku Aug 18 '14 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. – MrSchism Aug 19 '14 at 20:03
  • Then maybe this will help you: http://stackoverflow.com/questions/7478296/using-jqueryui-datepicker-and-input-masking-together. – Zentoaku Aug 20 '14 at 04:58
  • How did I miss that? That'll work! Thank you! I'll probably mess around with mask definitions, too. Thank you again! – MrSchism Aug 20 '14 at 14:19

0 Answers0