
Originally Posted by
pazdar
Good morning;
Using Responsive Classic template. One of my customers pointed this out to me, when you go into "login" on my website to set up an account, it ask you to verify your age. When I do this on my desktop, I'm able to put the age in as MM/DD/YYYY. However when you go into "login" on a tablet or i-phone, it gives you a calendar. It then does not like the calendar age and will not let you log in. I checked the error logs for my website and there is nothing there for this. What setting do I need to change or is there an error in the code somewhere?
Thank you,
David
I'm remembering an iOS date-related issue in the past. You can add some debug code to /includes/functions/functions_dates.php (around line 60):
Code:
function zen_valid_date(string $date, string $format = DATE_FORMAT): bool
{
trigger_error("zen_valid_date($date)");
// Build 3 formats from 1 with 3 possible separators
$format0 = str_replace('-', '/', $format);
$format1 = str_replace('/', '-', $format);
$format2 = str_replace(['/','-'], '', $format);
$d0 = DateTime::createFromFormat('!' . $format0, $date);
$d1 = DateTime::createFromFormat('!' . $format1, $date);
$d2 = DateTime::createFromFormat('!' . $format2, $date);
return ($d0 && $d0->format($format0) == $date) || ($d1 && $d1->format($format1) == $date) || ($d2 && $d2->format($format2) == $date);
}
Once that's added, give the create-account another try and post the logged results.
Bookmarks