Solved

datepicker and timepicker validation

Posted on 2010-09-20
4
606 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

630 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