Matthew Weier O'Phinney wrote:
-- Sudheer <[EMAIL PROTECTED]> wrote
(on Sunday, 10 August 2008, 10:26 PM +0530):
Has anybody written a tutor on how to integrate a Dojo date picker to
Zend_Form?
I followed the online Zend_Dojo_Form manual, but could not understand it
enough to have a working date picker. Searching on the Internet for few
hours wasn't useful either.
I would like to see an example usage of a nice JavaScript date picker
with Zend_Form, preferably with Dojo. In summary I would like to see the
code that
1. Instructs the application to use a dojo CDN
2. Adds necessary js files to the HTML document
3. Creates the form element with drop down calendar date picker
// in your application code:
$element = new Zend_Dojo_Form_Element_DateTextBox('datepicker');
$view->element = $element;
// In your view script:
<?php
$this->dojo()->useCdn() // uses AOL CDN by default
->addStylesheetModule('dijit.tundra.tundra');
There was one small mistake in the above line. Maybe a typo.
->addStylesheetModule('dijit.themes.tundra');
This is just for the archive's sake so that somebody reading it can know
the correct path.
Thanks again for your help. :)
echo $this->element;
// In your layout script:
<html>
<head>
<?php echo $this->dojo() ?>
</head>
<body>
<?php echo $this->layout()->content ?>
</body>
and that's all there is to it.