Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

memberprofiles - Date, SS_Datetime


Go to End


2 Posts   895 Views

Avatar
danzzz

Community Member, 175 Posts

1 March 2011 at 1:36am

hi there,

I'm using ajshorts memberprofiles module. I add some more fields to the member class (DataObjectDecorator).
I added a field for "birthday" with datatype "Date" and a field "active_time" with datatype "SS_Datetime".

In the frontend, when the forms are generated, there are only normal textfields for the datefields. How
can I change this to be datefields with datepicker?

thx
daniel

Avatar
danzzz

Community Member, 175 Posts

1 March 2011 at 2:14am

$fields->removeByName('birthday');
$birthdayfield = new DateField('birthday','Geburtstag');
$birthdayfield->setConfig('showcalendar', true );
$fields->push($birthdayfield);