compose icon indicating copy to clipboard operation
compose copied to clipboard

Date fails as model attribute when updated

Open jtreitz opened this issue 12 years ago • 2 comments

foo = new Application.Model()
foo.set({date: new Date()})
foo.get("date")
=> Thu May 24 2012 11:07:02 GMT+0200 (CEST)
foo.set({date: (new Date()).increment("day",1)})
foo.get("date")
=> Thu May 24 2012 11:07:02 GMT+0200 (CEST)
Expected: Fri May 25 2012 11:07:02 GMT+0200 (CEST)

jtreitz avatar May 24 '12 09:05 jtreitz

fixed this with

else if(a instanceof Date)
{
  return a*1 === b*1
}

in the eq function

jtreitz avatar May 24 '12 09:05 jtreitz

@jtreitz are you at the right project?

neonstalwart avatar May 24 '12 14:05 neonstalwart