[Vtigercrm-developers] Custom template - ui fields - date / time

Richard Hills - Technologywise richard at tw.co.nz
Mon Dec 4 02:20:53 GMT 2017


Hi all

I have a custom template in vtiger 6.5 with the following:

<div class="container-fluid editViewContainer">
         <form method="POST" action="index.php" class="form-horizontal 
recordEditView" id="EditView" name="EditView" enctype="multipart/form-data">
                 <table class="table table-bordered blockContainer 
showInlineTable equalSplit">
                         <tr>
                                 <td class="fieldLabel medium">Date</td>
                                 <td class="fieldValue medium">
                                         {assign var="FIELD_MODEL" 
value="{$MODEL.date}"}
                                         {include 
file="../Vtiger/uitypes/Date.tpl"}
                                 </td>
                                 <td class="fieldLabel medium">Time</td>
                                 <td class="fieldValue medium">
                                         {assign var="FIELD_MODEL" 
value="{$MODEL.time}"}
                                         {include 
file="../Vtiger/uitypes/Time.tpl"}
                                 </td>
                         </tr>
                 </table>
         </form>
</div>

I feed it the following data:

$model = [
     'date' => Vtiger_Field_Model::getInstance('date',$module),
     'time' => Vtiger_Field_Model::getInstance('time',$module);,
]

Although my date / time fields are being replaced to include the clock / 
calendar icons, the javascript to show options (eg. the date selector) 
are not properly being triggered.

I suspect I am just missing an HTML element but for the life of me have 
been unable to find it.

Thanks in advance for any advice.



More information about the vtigercrm-developers mailing list