Created
January 29, 2016 15:19
-
-
Save stormbreakers/5bec0b69142bf95991a3 to your computer and use it in GitHub Desktop.
check if start date is greater than end date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function checkTime() { | |
| start = $("#startDate").val(); | |
| end = $("#endDate").val(); | |
| if((Date.parse(start) > Date.parse(end))) { | |
| $("#startDate").focus(); | |
| alert('Incorrect Start time and End time'); | |
| return false; | |
| }else{ | |
| return true; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment