File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Clear validation message dynamically for the Datepicker Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Clear validation message dynamically for the Datepicker" Watch "Clear validation message dynamically for the Datepicker" New topic
Author

Clear validation message dynamically for the Datepicker

Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
I am using jquery validation on Datepicker. If we don’t enter any date or a future date I am getting the validation error message with the red background in the date field. Now if we enter a date and valid date in the date field and tab off the field and click once, the validation error message does not getting clear and the red background does not go away from the date field. I want to clear the message and clear the red background dynamically when we tab off the field and click once in jquery.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

Examine the classes that are placed on the field to make them look "in error". You may need to clear them yourself if the validation plugin is not playing nice with the datepicker plugin.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
I am using the datepicker in the field the following way:
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

Firstly, look at your post. Is that code formatted so that it's easy to read? You will receive faster and better help by taking the time to make your posted code well-formatted and well-indented.

Also, posting JSF markup (or any other server-side markup) in an HTML forum where most people likely don't know anything about JSF isn't the best strategy.

I hope that will help you get your question answered.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Clear validation message dynamically for the Datepicker