Solved

datepicker and timepicker validation

Posted on 2010-09-20
4
600 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
ID: 33722406
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
ID: 33727713
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
ID: 33728412
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
ID: 33766282
I was looking for a more complete solution.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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)

786 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