All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low Events won't validate really old dates, like 1866

Gary Reckard 8 Feb 2016 23:42 problem, complete

I'm getting validation errors when using dates in the far past. I am building a timeline that includes dates as far back as 1866. When I enter those dates, I cannot submit my entry due to the validation errors "Start date is invalid" and "End date is invalid". Is this just a limitation of the add-on? Or is there some way to get around this?

Replies

  1. Gary Reckard 8 Feb 2016 23:43

    P.S. I'm on Low Events 1.5.1 and EE 2.10.3

  2. Low 9 Feb 2016 07:57

    Right now, it's a limitation, but I can remove that (although you're the first I've encountered that has the need for really old events).

    Open up ft.low_events.php and look up line #568, which reads

    return preg_match('/^(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/', $str);


    Change that to

    return preg_match('/^(18|19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/', $str);

  3. Gary Reckard 9 Feb 2016 18:29

    Thanks, Low! That fixed it!