jquery validate date of birth format dd-mm-yy

jquery validation for dob to specific format ie dd-mm-yy

    function(value, element) {
        return value.match(/^dd?-dd?-dd$/);
    "Please enter a date in the format dd-mm-yyyy.");
And then on your form add:
        rules : {
            myDate : {
                dateFormat: true

The difference Between Document.Ready() v/s Window.Load

$(document).ready(function() { is jQuery event that is fired when DOM is loaded, so it’s fired when the document structure is ready.

$(document).ready(function() {
alert(“document ready occurred!”);

$(window).load() event is fired after whole content is loaded.

$(window).load(function() {
alert(“window load occurred!”);