Validate date in dd/mm/yyyy format using JQuery Validate

You don’t need the date validator. It doesn’t support dd/mm/yyyy format, and that’s why you are getting “Please enter a valid date” message for input like 13/01/2014. You already have the dateITA validator, which uses dd/mm/yyyy format as you need. Just like the date validator, your code for dateGreaterThan and dateLessThan calls new Date for … Read more

correct way of comparing string jquery operator =

No. = sets somevar to have that value. use === to compare value and type which returns a boolean that you need. Never use or suggest == instead of ===. its a recipe for disaster. e.g 0 == “” is true but “” == ‘0’ is false and many more. More information also in this … Read more

$(document).on(“click”… not working?

You are using the correct syntax for binding to the document to listen for a click event for an element with id=”test-element”. It’s probably not working due to one of: Not using recent version of jQuery Not wrapping your code inside of DOM ready or you are doing something which causes the event not to … Read more