Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: Problems with the field Date

$
0
0

Hi Swaiba,
thanks for your answer, unfortunately, are only 2 months I program with SilverStripe, I still have a little experience.
Below you carry the full code of dataobject, it is very easy.

=== I use Silverstripe version 2.4 ====

Artista.php

<?php
class Artista extends DataObject {
   public static $db = array(
      "Nome" => "Text",
      "Cognome" => "Text",
      "DataNascita" => "Date", // This is the date Field       
   );
   
   
   static $searchable_fields = array(
   "Nome" => "Nome Artista",
   "Cognome" => "Cognome Artista"   
   );   

static $summary_fields = array(
   "Nome" => "Nome Artista",
   "Cognome" => "Cognome Artista",
   );
   

      public function getCMSFields()
   {
      return new FieldSet(
         
         new TextField('Nome'),
         new TextField('Cognome'),         
         new DateField('DataNascita', 'Data Nascita') //this is the date field          
   
      );
   }

Thank you all in advance for the help that you will give me
Have a nice day
MG


Posted to: Problems with the field Date | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles