Переглянути джерело

Use Handlebars helper to format date correctly

Adel Qalieh 12 роки тому
батько
коміт
69d3e7dc46
2 змінених файлів з 4 додано та 1 видалено
  1. 3 0
      astroid-web.coffee
  2. 1 1
      client/index.html

+ 3 - 0
astroid-web.coffee

@@ -33,3 +33,6 @@ if Meteor.isClient
         priority: priority
         completed: false
         repeating: false
+
+  Handlebars.registerHelper 'formatDate', (date) ->
+      moment(date).format('D MMM YYYY')

+ 1 - 1
client/index.html

@@ -325,7 +325,7 @@
     <a href="#" class="completeBox"></a>
     <div class="taskRowTop">{{body}}</div>
     <small class="taskRowBottom">
-      <span class="dueDate text-danger">{{date}}</span> | <span class="taskItemList">{{list}}</span>
+      <span class="dueDate text-danger">{{formatDate dateDue}}</span> | <span class="taskItemList">{{list}}</span>
     </small>
   </div>
 {{/each}}