I'm using a .net custom validator to check an input date in a form. I want to validation to check the number of days in Feb ie 28/02/2015 but not 29/02/2015.
For the c# server validation this is working fine:
try
{
DateTime dt = DateTime.Parse("29/02/2015");
}
catch
{
args.IsValid = false;
}
This will validate as false;
But I can't get a javascript date parse to work in the same way for my client validation. Is there a simple way of achieving this in Javascript?