0

I was wondering how I can format the text and make some part of the datetime string bold?

For example I want to make my current date time format, which looks like: 02/19/2018 16:00 CST to 02/19/2018 16:00 CST.

This is the code that is generating the current date time format.

<td{{ visit['end_dte'] | date:'MM/dd/yyyy HH:mm Z'}}</td>

I tried doing <td{{ visit['end_dte'] | date:'MM/dd/yyyy <b>HH:mm Z</b>'}}</td> but it made it so that the pipe was represented as text instead of bolding the time.

2
  • <td> make sure this isnt a simple mistake, you forgot one of the angle braceys Commented Feb 19, 2018 at 23:03
  • 1
    Thanks @Isaac but I accidentally deleted it when I was copy pasting code. Commented Feb 19, 2018 at 23:06

1 Answer 1

5

Separate it into 2 different filter calls

<td>
  {{ visit['end_dte'] | date:'MM/dd/yyyy'}} <b>{{ visit['end_dte'] | date:'HH:mm Z'}}</b>
</td>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.