Overriding date time picker helper

Permalink
So i'm trying to modify the date-time helper in order to use the limit options in the picker that appears.
I've looked at this post here:http://www.concrete5.org/community/forums/customizing_c5/using-mind... but can't work out what it is exactly in the helper I need to override. I've tried looking for the actual helper to look into it but all I can find is a blank class, overriding another class which I can't find.

Any help would be greatly appreciated!

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
Many core classes are organised through a wrapper, so in
/concrete/form/date_time.php

class FormDateTimeHelper extends Concrete5_Helper_Form_DateTime {}

actually extends the code in the file
/concrete/core/helpers/form/date_time.php


So your override of the helper should have a definition something like
class FormDateTimeHelper extends Concrete5_Helper_Form_DateTime {
  public function datetime( ....){
    // your implementation 
  }
}


The reason for doing it that way is so you only need to declare the functions (methods) you are replacing. All other methods are inherited from the original.
CrystalShardz replied on at Permalink Reply
Thanks for the help! managed to find the helper base class from the path provided to see what i needed to edit.