21283 Posts in 5730 Topics by 2602 members
| Go to End | ||
| Author | Topic: | 843 Views |
-
Re: DatePicker in GridField SS 3

12 October 2012 at 4:49am
Hi Optic Blaze,
I have found the problem. It wasn'd the datatepicker. There was a problem with misspelling in an other field.
I had copied the code from a different page without a datepicker.Thanks a lot..
Regards Andy
-
Re: DatePicker in GridField SS 3

12 October 2012 at 10:22am
Hi there,
Good to hear. I worked on the code... mine looks a bit different...but i checked it and it works:
<?php
class Termin extends DataObject {
static $db = array(
'FirstDate' => 'Date',
'DateRange' => 'Varchar',
'Description' => 'HTMLVarchar'
);function getCMSFields() {
$fields = new FieldList(
$dateField = new DateField('FirstDate', 'FirstDate'),
new HTMLEditorField('Description','Beschreibung'),
new TextField('DateRange','Termin')
);
$dateField->setConfig('showcalendar', true);
$dateField->setConfig('dateformat','dd-MM-yyyy');return $fields;
}
}
| 843 Views | ||
| Go to Top |


