Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Fixed bug in date formatting
Browse files Browse the repository at this point in the history
Do not show the current date/time when a date/time value in NULL
  • Loading branch information
marlonbaeten committed Feb 24, 2016
1 parent 1064899 commit b47c235
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
{% endblock %}

{% block crudify_field_time %}
{{ value|date('H:i') }}
{{ value ? value|date('H:i') }}
{% endblock %}

{% block crudify_field_date %}
{{ value|date('Y-m-d') }}
{{ value ? value|date('Y-m-d') }}
{% endblock %}

{% block crudify_field_datetime %}
{{ value|date('Y-m-d H:i') }}
{{ value ? value|date('Y-m-d H:i') }}
{% endblock %}

{% block crudify_field_datetimetz %}
{{ value|date('Y-m-d H:i P') }}
{{ value ? value|date('Y-m-d H:i P') }}
{% endblock %}

{% block crudify_field_email %}
Expand Down

0 comments on commit b47c235

Please sign in to comment.