class Article extends Page { // Model
static $db = array(
'Date' => 'Date',
'Author'=>'Text'
);
private static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', $date = new DateField('Date'),'Content');
DateField::create('MyDate')->setConfig('showcalendar', true);
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
}
가 Plz은이 좀 도와 ... 위의 코드는 날짜 선택기를 표시해야하지만 표시되지 않습니다 ..
날짜 선택기
죄송하지만 질문은 제대로 게시되지 않습니다. 희망 사항을 이해합니다. – user3262786
이전에 제안한대로 [Silverstripe tutorials] (http://doc.silverstripe.org/framework/en/tutorials)를 방문하여 Silverstripe로 작업하는 방법에 대한 기본적인 이해를 얻으십시오. [튜토리얼 2] (http://doc.silverstripe.org/framework/en/tutorials/2-extending-a-basic-site#adding-date-and-author-fields)를 살펴보고 따라야한다면 그것은 정확히 당신에게 Datepicker를 추가하는 방법을 보여줄 것입니다 : http://doc.silverstripe.org/framework/en/tutorials/2-extending-a-basic-site#adding-date-and-author-fields – 3dgoo