This was intially checking a null date until @Bakual 's changes. However now there is no reason for it. This can cause bugs when you don't have a fully integer date (e.g. display a month in full which is perfectly compatible with strtotime() http://php.net/manual/en/datetime.formats.date.php)
To test check the calendar still works as expected
If you want to go the extra mile you can add a format like %B %Y into the calendar. This will save correctly but not render. Apply patch and it should be fixed.
There was 1 error:
1) JFormFieldCalendarTest::testGetInput
Exception: DateTime::__construct(): Failed to parse time string (value) at position 0 (v): The timezone could not be found in the database
/home/travis/build/joomla/joomla-cms/libraries/joomla/date/date.php:106
/home/travis/build/joomla/joomla-cms/libraries/joomla/factory.php:530
/home/travis/build/joomla/joomla-cms/libraries/joomla/form/fields/calendar.php:197
/home/travis/build/joomla/joomla-cms/libraries/joomla/form/field.php:393
/home/travis/build/joomla/joomla-cms/libraries/joomla/form/fields/calendar.php:73
/home/travis/build/joomla/joomla-cms/tests/unit/suites/libraries/joomla/form/fields/JFormFieldCalendarTest.php:523
FAILURES!
Tests: 5700, Assertions: 10446, Errors: 1, Incomplete: 9, Skipped: 127.
`` `
https://travis-ci.org/joomla/joomla-cms/jobs/47277702<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="http://issues.joomla.org/tracker/joomla-cms/5763">issues.joomla.org/joomla-cms/5763</a>.</sub>
@wilsonge
travis is not happy with that change see: