Skip to content

Instantly share code, notes, and snippets.

@dieseltravis
Created November 17, 2008 22:46
Show Gist options
  • Save dieseltravis/25940 to your computer and use it in GitHub Desktop.
Save dieseltravis/25940 to your computer and use it in GitHub Desktop.
Date Validator
Protected Sub DateValidator_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles DateValidator.ServerValidate
args.IsValid = DateTime.TryParse(args.Value, New DateTime())
End Sub
var isDateValid = function (source, arguments) {
arguments.IsValid = (Date.parse(arguments.Value) != null);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment