Validate Dates using Javascript
In this tutorial we will be creating a prototype method in Javascript that will help us validate any date entered from the user's input. The function will take two arguments: Argument 1: Target Delimiter. e.g. how the user should separate the digits. Common delimiters are '/' or '-'. Argument 2: Target Format. The order of the year (y), the month (m) and the day (d). Common formats are 'mdy', or 'ymd'.