を生成私は介してjQueryのコンポーネントを有効にしたZendの形を有する:のZendとjQuery日付ピッカー予想外の結果
ZendX_JQuery::enableForm($this);
、その後いくつかの非jQueryの要素を追加し、1 jQueryの日付ピッカー、のように定義:
$testing = new ZendX_JQuery_Form_Element_DatePicker('dp1', array('jQueryParams' => array('dateFormat' => 'yy-mm-dd')));
$testing->setLabel('Date of Birth 2')
->setRequired(true)
->addValidator('NotEmpty');
Iは、次いで、以下のように(最初の全ての要素のために、次に日付ピッカーのためのデコレータ定義を置き換え)デコレータを設定:
$this->clearDecorators();
$this->addDecorator('FormElements')
->addDecorator('HtmlTag', array('tag' => 'div', 'class'=>'form-block'))
->addDecorator('Form');
$this->setElementDecorators(array(
array('ViewHelper'),
array('Errors'),
array('Description', array('tag' => 'div', 'class' => 'tooltip')),
array('Label', array('separator'=>' ')),
array('HtmlTag', array('tag' => 'div', 'class'=>'element-block')),
));
$formJQueryElements = array(
array('UiWidgetElement', array('tag' => '')),
array('Errors'),
array('Description', array('tag' => 'div', 'class' => 'tooltip')),
array('Label', array('separator' => ' ')),
array('HtmlTag', array('tag' => 'div', 'class' => 'element-block')),
);
$this->getElement('dp1')->clearDecorators();
$this->getElement('dp1')->setDecorators($formJQueryElements);
これは、何らかの形でテキストフィールドに変換されたDatePickerを除いて、すべてのフィールドを正しく表示しているようです。
日付ピッカーではありません<div class="element-block">
<label for="dp1" class="required">Date of Birth 2</label>
<input type="text" name="dp1" id="dp1" value="">
</div>
:フィールドのHTMLは次のようになります。これを設定するのに何が欠けているのですか、ここでは何の誤りがありましたか?
多くのありがとうございます。