For some reason new date fields created in an already existing install of Silverstripe (2.5.4) won't save to the database. The date field is inside a widget, perhaps that is the issue?
Code snippet:
static $db = array(
'startDate => Date',
);
function getCMSFields() {
return new Fieldset(
new datefield('startDate')
);
}
This generates a date field in the database and displays the field in the backend, however, whenever I try to save the page, the date disappears without getting saved. My console reports no errors. I've also tried using the datepicker calendar, but this is also unsuccssful. When the user clicks on a day, they are redirected back to the home page. That does return an error on line 859 of the jquery UI Datepicker code. The error is "can't set currentDay of undefined."
This install of SS is using the blog module, and the date fields for the BlogEntry page work perfectly. It doesn't redirect and correctly saves to the database.
If anyone has encountered this error before and/or has any ideas on fixing, I'd love to hear them!
Thanks
Adam