Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

GNU GPL

The GNU GPL is an
open-source license.
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(5 ratings)

ZF-DateTimePicker

ZF-DateTimePicker
Developed by Darius Matulionis, Released Feb 10, 2011

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

PHP

Tags: date , date time , date time picker , jquery

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

Back to top

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"))
);
Back to top

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 ();
    
View all 5 reviews »

User Reviews

Read all 3 comments »

Questions & Comments


Or enter your name and Email
  • Luis 4 months 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
  • Darius Matulionis Developer 1 year ago
    If you want just a timepicker without the calendar just do like this:

    $duration = new Core_Form_Element_DateTimePicker('duration');
    $duration->setJQueryParams(array(
    'ampm' => false,
    'hourGrid' => 4,
    'minuteGrid' => 5,
    'stepHour' => 1,
    'stepMinute' => 5,
    ));
    $duration->setAttrib('timepicker', true);
    $this->addElement($duration->setLabel("Duration"));
  • Robert 1 year ago
    How can I set to start from the actual date and time?
    Solved :)
You must be logged-in to vote. Log-in to your account or register now.