ZF-DateTimePicker

ZF-DateTimePicker

Released 4 years ago , Last update 4 years ago

Jquery Date time picker form element view helper integration to Zend Framework.

Jquery Date time picker (made by Trent Richardson:  [http://trentrichardson.com]) form element view helper integration to Zend Framework. 

4.2
  • 5 4
  • 4 1
  • 3 0
  • 2 0
  • 1 1
6 Reviews Read Reviews

Pricing

FREE

GNU GPL

The GNU GPL is an open-source license.

Documentation

Add a form element to a Zend_Form object:

$date_time = new Core_Form_Element_DateTimePicker('call_date_time');
$date_time->setJQueryParams(array(
    'minDate' => 'new Date(' . date("Y") . ',' . date("m") . ',' . date('d') . ',' . date('H') . ',' . date('i') . ',' . date('s') . ')',
    'dateFormat' => 'yy-mm-dd',
    "timeFormat" => 'hh:mm:ss'
));
//$form is a Zend_Form object instance
$form->addElement(
    $date_time->setAttrib('size', '30')
              ->setLabel('call_date_time')
              ->setValue(date("Y-m-d H:i:s"))
);

Installation

Requiresments

  • ZendX library - must be included in your library path

Setup

  • Register helper path in your Bootstrap.php:
    protected function _initViewHelpers() {

            $this->bootstrap('layout');
            $layout = $this->getResource('layout');
            $view = $layout->getView();
    
            ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
            $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
            $view->addHelperPath('ZendX/JQuery/View/Helper/JQuery', 'ZendX_JQuery_View_Helper_JQuery');
            $view->addHelperPath('Core/View/Helper/', 'Core_View_Helper');
        }
  • Place the '/Core' directory under your library directory

  • Register new namespace in your application.ini file (¬†autoloaderNamespaces[] = "Core_"¬†)
  • In your layout.phtml file in the HEAD tag add:
    echo $this->headLink();

    echo $this->headScript();
    
    $this->jQuery ()
            ->setUiVersion ( '1.8.7' )
            ->setVersion ( '1.4.4' );
    echo $this->jQuery ();
License » GNU GPL Download

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
  • L Luis 2 years ago
    Can you help me? Warning: Exception caught by form: Plugin by name 'DateTimePicker' was not found in the registry; used paths: ZendX_JQuery_View_Helper_: ZendX/JQuery/View/Helper/ Zend_View_Helper_: Zend/View/Helper/;C:/Program Files (x86)/Zend/Apache2/htdocs/32labs/application/views\helpers/ Stack Trace: #0 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\View\Abstract.php(1182): Zend_Loader_PluginLoader->load('DateTimePicker') #1 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\View\Abstract.php(618): Zend_View_Abstract->_getPlugin('helper', 'dateTimePicker') #2 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\View\Abstract.php(344): Zend_View_Abstract->getHelper('dateTimePicker') #3 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\ZendX\JQuery\Form\Decorator\UiWidgetElement.php(168): Zend_View_Abstract->__call('dateTimePicker', Array) #4 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\ZendX\JQuery\Form\Decorator\UiWidgetElement in C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Form.php on line 2925
  • R Robert 3 years ago
    How can I set to start from the actual date and time? Solved :)