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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   959 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);