You can check if a string could be a date by attempting to create a Date object from it and then checking if the date object is valid. You can use the following code snippet in JavaScript to achieve this:
index.tsx291 chars14 lines
This function will return true if the string could represent a valid date and false if it could not be a valid date.
gistlibby LogSnag