title: Silverstripe 3: How to show date picker in CMS datagrid
body: <p>I have a datagrid allowing the user to add events to an event page.</p>
  
  <p>On it, I have 2 date fields so they can specify a start and end date. These fields do not show the date picker unless I comment out a line from DateField.js in Sapphire/javascript (line 12 - <code>if(!config.showcalendar) return;</code>).</p>
  
  <p>Is there anyway to get the date picker to show without tampering with the core?</p>
  
  <pre><code>&lt;?php
  class Event extends DataObject{
      public static $db = array(
          'Title' =&gt; 'Varchar(255)',
          'StartDate' =&gt; 'Date',
          'EndDate' =&gt; 'Date',
          'Summary' =&gt; 'Text',
          'Content' =&gt; 'HTMLText'
      );
  
      static $has_one = array( 
          'WhatsOnCategory' =&gt; 'WhatsOnCategory',
          'EventImage' =&gt; 'Image'
      );
  
      public static $summary_fields = array(
          'Title' =&gt; 'Title'
      );
  
      public static $default_sort='StartDate';
  
      public function getCMSFields() {
          return new FieldList(
              new TextField('Title', 'Title'),
              new DateField('StartDate', 'StartDate'),
              new DateField('EndDate', 'EndDate'),
              new TextField('Summary', 'Summary'),
              new HTMLEditorField('Content', 'Content'),
              new UploadField('EventImage','Image')
          );
      }
  }
  </code></pre>