I want to validate BirthDate, which should be in "mm/dd/yyyy" format, on the client side.
I have tried it as following, but it is not working properly:
$("#btnUpdateEditCB3").click(function(event) {
    var txtBirthDate = $('#<%= txtBirthDateCB3.ClientID %>').val();
    var txtNickName = $('#<%= txtNickNameCB3.ClientID %>').val();
    if (txtBirthDate != "") {
        if (txtBirthDate.match(/^(?:(0[1-9]1[012])[\/.](0[1-9][12][0-9]3[01])[\/.](1920)[0-9]{2})$/)) {
            alert("Please enter date in mm/dd/yyyy format");
            $('#<%= txtBirthDateCB3.ClientID %>').focus();
            return false;
        }
    }
});
 
     
     
     
     
    