Is it possible to set the min and max date constraints on a DateTextBox?  I
have done it successfully in javascript after creation, but am looking for a
way to do it during construction.  I have tried a few methods, none of which
have worked:

During the element creation, within a Zend_Dojo_Form

$this->addElement('DateTextBox', 'start', array(
            'label' => 'Start Date'
            'min' => '2008-12-01',
            'max' => '2008-12-31',
        ));

after the form is created and assigned to the $form variable (this is the
way I would prefer to do it)

$form->start->min = '2008-12-01';

also tried,

$form->start->setDijitParam('min', '2008-12-01');

so far I have only been successful doing (in javascript):

var startDate = dijit.byId('start');
startDate.constraints = dojo.mixin(startDate.constraints, {min:
dojo.date.stamp.fromISOString('2008-12-01')});


Any help would be appreciated.

Thanks,

Matt Lorey
-- 
View this message in context: 
http://www.nabble.com/Setting-min-and-max-dates-on-Zend_Dojo-DateTextBox-tp20835168p20835168.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to