Przeglądaj źródła

Move to native Javascript dates

Adel Qalieh 12 lat temu
rodzic
commit
e3b457c70a
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      astroid-web.coffee

+ 2 - 3
astroid-web.coffee

@@ -8,7 +8,7 @@ if Meteor.isClient
 
   Template.todos.events
     'click a.completeBox': (e) ->
-      now = moment()
+      now = new Date()
       Tasks.update this._id,
         $set:
           completed: not @completed
@@ -20,12 +20,11 @@ if Meteor.isClient
       e.preventDefault()
       body = $('#new-task-text').val()
       $('#new-task-text').val("")
-      now = moment()
+      now = new Date()
       priority = 'low'
       list = 'Home'
       Tasks.insert
         body: body
-        date: now.format('D MMM YYYY')
         dateDue: now
         dateCreated: now
         dateCompleted: false