<script type="text/javascript" src="../script/JqueryMinVer.js">script>
<script type="text/javascript">
$(document).ready(
function () {
$("[id$='btnLoadStatistics']").click(
function () {
return validate();
}
);
function isValidDate(sText) {
//var dateRegex = new RegExp("^([0-2][0-9]|[3][0-1]|[0-9])/([0][0-9]|[1][0-2]|[0-9])/([1][8-9][0-9][0-9]|[2][0-9][0-9][0-9])$")
var reDate = /(?:0[1-9]|[12][0-9]|3[01])\/(?:0[1-9]|1[0-2])\/(?:19|20\d{2})/;
return reDate.test(sText);
}
function validate() {
var strDate = $("[id$='txtDate']").val();
if (isValidDate(strDate)) {
return true;
} else {
return false;
}
}
);
script>
No comments:
Post a Comment