Fixes issue #1590 crash when selecting Published On for a Page

Fix for the crash, but there still might be an issue with the date picker not showing up correctly.