Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

inserting a momentjs object in meteor collection


inserting a momentjs object in meteor collection  using -'mongodb,meteor,momentjs'

I have a simple Meteor collection and I am trying to insert a document that has a momentjs property into it. So I do:

docId = Col.insert({m: moment()});


However, when I try to get this document back with

doc = Col.findOne({_id: docId})


I get "Invalid date" for doc.m like so:

Object {_id: "wnHzTpHHxMSyMxmu3", m: "Invalid date"}


Anyone?!
    

asked Sep 21, 2015 by patelnikul321
0 votes
21 views



Related Hot Questions



Government Jobs Opening


...