What's the best way to trap getformatter errors before it throws a datatables error pop up?

What's the best way to trap getformatter errors before it throws a datatables error pop up?

pw27pw27 Posts: 19Questions: 3Answers: 0

Field::inst( 'accepted' ) ->validator( Validate::dateFormat( 'Y-m-d' ) ) ->getFormatter( Format::dateSqlToFormat( 'd-m-Y' ) ) ->setFormatter( Format::dateFormatToSql('d-m-Y' ) ),

throws a modal error message if the sql data ins't a valid date... What I want to do is skip the formatter in that case.

eg:
if the table entry is:

Yes - 8/22/2024

I obviously get the error box, what I want is to simple show the data as-is if it's not valid....

Thanks...

Answers

Sign In or Register to comment.