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

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


I have for now "solved" this by using a manual call to datepicker() and 
timepicker() functions using jquery, but guess this is not the 
recommended solution, if anyone can tell me what that would be that'd be 
great.

Thank you


On 04/12/17 15:20, Richard Hills - Technologywise wrote:
> 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.
>
> _______________________________________________
> http://www.vtiger.com/



More information about the vtigercrm-developers mailing list