Solved

datepicker and timepicker validation

Posted on 2010-09-20
4
598 Views
Last Modified: 2012-05-10
Hello experts. Looking for date time validation for datepicker and timepicker I have a from date and from time and a to date and to time. To value cannot be less that from value and if from and to date value is the same then time value must pass validation and have a min time diff of 1 hour.
0
Comment
Question by:ikeyser
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
you can check this link, they have shown that you can force the validation at the selection of date from datepicker

http://forum.jquery.com/topic/jquery-plugin-validation-date-picker-jquery-ui
http://forum.jquery.com/topic/ui-datepicker-w-validation-plugin-doesnt-get-ride-of-error-message
0
 

Author Comment

by:ikeyser
Comment Utility
quirvinder -  I don't want the validation to occur until they submit the form.  
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
Comment Utility
you can force the validation (of date) on that particular element.
please refer to the first link for the same above.
you can set the date validation on the same
http://docs.jquery.com/Plugins/Validation/Methods/date

Also you need add the custom validation methods
http://stackoverflow.com/questions/833997/end-date-greater-than-start-date-jquery-validation
http://stackoverflow.com/questions/1244738/time-validation-and-comparing-using-javascript-jquery
0
 

Author Closing Comment

by:ikeyser
Comment Utility
I was looking for a more complete solution.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I have answered several questions lately that were solved utilizing the power of jQuery's AJAX functions, so I thought I would write an article demonstrating the ease of use. Why should I use jQuery as opposed to regular JavaScript? Now I know…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now