but some bizzarrrre behaviour going on, if I do:
var missingDates= etc
or remove the + signs it will complain that missingDates is undefined..... why does the "var" or the "+" make it work?
not make it work* (is there an edit post feature??? I don't see it)
0
Alexander Popov
Telerik team
answered on 26 Sep 2014, 12:24 PM
Hello Jim,
Adding a plus sign before a Date object returns its value in milliseconds. This is done in order to easily compare the dates, as simply comparing Date objects won't work as expected. For example:
a = new Date(2014,1,1)
Sat Feb 01 2014 00:00:00 GMT+0200 (FLE Standard Time)
b = new Date(2014,1,1)
Sat Feb 01 2014 00:00:00 GMT+0200 (FLE Standard Time)
a == b
false
+a == +b
true
Using the "var" keyword changes the scope in which the variable is defined, so it is no longer accessible from the content template.
Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!