Avatar of summer2012

asked on 

Jquery date time validation in sharepoint designer

I also want to add validation to start time and end time
$(document).ready(function() {
         var st = parseInt($('#st').val().replace(':', ''), 10);
          var et = parseInt($('#et').val().replace(':', ''), 10);
              if(st > et)
                alert('end time always greater then start time');
             }     }); });
That doesn't work with a 12-hour time format; 12:00 AM is before 11:59 PM.

Web DevelopmentjQueryWeb Languages and StandardsMicrosoft SharePoint

Avatar of undefined
Last Comment
Jon Norman

8/22/2022 - Mon