<tr>
    <td>
        <input type="text" class="form-control datepicker vdate" data-id="{$myObject->id}" data-colName="antenaldate" data-tableName="antenalvisit" value="{$myObject->antenaldate}" readonly/>
    </td>

    <td>
        <label data-id="{$myObject->id}" {if $myObject->dateFlag == 1}style="color: red;font-size: 18px;"{else} style="color: maroon; font-weight : bolder;font-size: 18px;"{/if}>{$myObject->w}</label>
    </td>

    {if $ProgramesettingData->diagnosshow eq 0}
    <td>
        <!--     -->
        <!--select2me complaint-->
        <input type="hidden" id="currentid" value="{$myObject->id}"/>
        <select multiple="" size="1" class="form-control select2me complaintant updateDiagnosis" id="complaint{$myObject->id}" data-id="{$myObject->id}" data-colName="complaintid" data-tableName="antenalvisit">
            <option value="">choose</option>
            {foreach $allcomplaint as $comp}
            <option value="{$comp->id}">{$comp->name}</option>
            {/foreach}
            <option value="-1" class="addDiagnosis">Add</option>
            <option value="-2" class="deleteoptincompo">Delete</option>
        </select>
    </td>
    <td>
        <!--     -->
        <!--select2me diagnosis-->
        <select multiple="" class="form-control select2me diagnosisant updateDiagnosis" id="diagnosis{$myObject->id}" data-id="{$myObject->id}" data-colName="diagnosisid" data-tableName="antenalvisit">
            <option value="">choose</option>
            {foreach $alldiagnosis as $mydiagnosis}
            <option value="{$mydiagnosis->id}">{$mydiagnosis->name}</option>
            {/foreach}
            <option value="-1" class="addDiagnosis">Add</option>
            <option value="-2" class="deleteoptincompo">Delete</option>
        </select>
    </td>
    {else}
    <td>
        <input type="text" class="form-control updateElement" data-id="{$myObject->id}" data-colName="complaint" data-tableName="antenalvisit" value="{$myObject->complaint}"/>
    </td>
    {/if}
    <td>
        <input type="text" class="form-control updateElement" data-id="{$myObject->id}" data-colName="wt" data-tableName="antenalvisit" value="{$myObject->wt}"/>
    </td>
    <td>
        <input type="text" class="form-control bp_mask updateElement" data-id="{$myObject->id}" data-colName="bp" data-tableName="antenalvisit" value="{$myObject->bp}"/>
    </td>

    <td>
        <textarea class="form-control txtc updateElement" rows="1" data-id="{$myObject->id}" data-colName="notes" data-tableName="antenalvisit" placeholder="Enter more text">{$myObject->notes}</textarea>
    </td>
    <td>
        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$myObject->id}" style=" float: left;" href="#" data-link="antenalvisit" data-fn="del">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>

{literal}
<script type="text/javascript" >
    $(".bp_mask").inputmask("999/999", {autoUnmask: true});
    $('.datepickertoday').datepicker('setDate', '+0');
    $('.datepicker').datepicker();
    var diagnosis_itr = $('#currentid').val();
    $('#currentid').remove();
    $('#diagnosis' + diagnosis_itr).select2({width: '270px', allowClear: true,
        formatNoMatches: function (term)
        {
            //return "<input class='form-control' id='newregTerm' value='" + term + "'><a href='#' id='addregnew' data-id=" + diagnosis_itr + " class='btn btn-default'>Add</a>"
        }});
    $('#complaint' + diagnosis_itr).select2({
        width: '270px',
        allowClear: true,
        formatNoMatches: function (term) {
            //return "<input class='form-control' id='newregTerm' value='" + term + "'><a href='#' id='addregnew' data-id=" + diagnosis_itr + " class='btn btn-default'>Add</a>"
        }
    });

</script>
{/literal}