Skip to content

Can not use formatDate helper inside table #93

@adokarasev

Description

@adokarasev

Actual Behaviour

Template should be rendered.

Expected Behaviour

Test email is not received. It's hard to say what is wrong. But when I replace table with ul or just p tags it works ok.

Steps to reproduce it

  • Create email template
<html>
<body>
<table>
<tbody>
{{#each meetings}}
<tr>
    <td>{{title}}</td>
    <td>{{formatDate startAt "h:mm"}}</td>
    <td>{{formatDate endAt "h:mm"}}</td>
</tr>
{{/each}}
</tbody>
</table>
</body>
</html>
  • Set test data
{ 
    "meetings": [
        {
            "title": "meeting 7",
            "startAt": 1633023600,
            "endAt": 1633023600
        },
        {
            "title": "meeting 8",
            "startAt": 1633023600,
            "endAt": 1633023600
        },
        {
            "title": "meeting 8",
            "startAt": 1633023600,
            "endAt": 1633023600
        }            
    ]
}
  • Editor shows data in the table.
  • Send test email
  • No email received

If you replace table with list it works fine. If you delete formatDate helper it also works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions