Skip to content

Commit

Permalink
Merge pull request #42 from JulianDroog/bug/missing-javascript-function
Browse files Browse the repository at this point in the history
Added validateDate() function
  • Loading branch information
arodu authored Jan 19, 2024
2 parents 054ade7 + 5220f3a commit 9fce59c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Datatable/Datatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ class Datatable
});
dt.css(:tableCss);
function validateDate(text) {
text = text.replaceAll("/","-");
var re = /^(\d{4}(-)\d{2}(-)\d{2}|\d{2}(-)\d{2}(-)\d{4})$/;
return re.test(text);
}
});
DATATABLE_CONFIGURATION;

Expand Down

0 comments on commit 9fce59c

Please sign in to comment.