[Plugin: Custom Coming Soon Pages] Launch date format not working for any year other than 2011
-
I had to select the 10th of January, 2012 as the launch date for a site. When I did that, the countdown date on the coming soon page disappeared. I checked out the code and noticed the date is saved in the database as “10 January, 2012”. PHP doesn’t recognize this as a valid date format (“10 January 2012” or “January 10, 2012” is valid), so it ignores the year.
I’m assuming PHP guesses the year for strtotime(’10 January, 2012′) so the output of that is the same as strtotime(’10 January 2011′). I suggest the following fixes in the code to remedy this:
framework/admin_options.php (line 231)
change:
'odefault' => "31 Dec, 2011",
to:
'odefault' => "31 Dec 2011",
assets/admin.js (line 14)
change:
$( this ).datepicker( "option", "dateFormat", 'd MM, yy' );
to:
$( this ).datepicker( "option", "dateFormat", 'd MM yy' );
https://www.ads-software.com/extend/plugins/custom-coming-soon-page/
- The topic ‘[Plugin: Custom Coming Soon Pages] Launch date format not working for any year other than 2011’ is closed to new replies.