Skip to content

Instantly share code, notes, and snippets.

@triniMahn
Created March 17, 2014 23:24
Show Gist options
  • Save triniMahn/9610466 to your computer and use it in GitHub Desktop.
Save triniMahn/9610466 to your computer and use it in GitHub Desktop.
searchArchivedByDate: =>
dateFrom = Date.parse(@ui.dateFrom.val())
dateTo = Date.parse(@ui.dateTo.val())
Todo.find {archived: true, created: {$gte: dateFrom.valueOf(), $lt: dateTo.valueOf()}}, (err,todos)->
console.log(err) if err
app.collections.tds.reset(todos or [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment