I am developing a web page with JavaScript and HTML. I am use jQuery and I must highlight a selected dates. I have that array:
var events = [
{ Title: "Five K for charity", Date: new Date("02/13/2013"), dir: "http://www.google.es" },
{ Title: "Dinner", Date: new Date("02/25/2013") },
{ Title: "Meeting with manager", Date: new Date("03/01/2013") }
];
My question is, how I can add an element in that array? I tried a lot of things and I dont know how. And another question, what is the name of that kind of array?
EDIT:
I see one thing. If a add a date like "01/05/2013", the array is like that:
Wed Feb 13 2013 00:00:00 GMT+0100 (Hora de verano romance)
Mon Feb 25 2013 00:00:00 GMT+0100 (Hora de verano romance)
Fri Mar 01 2013 00:00:00 GMT+0100 (Hora de verano romance)
Sat Jan 05 2013 00:00:00 GMT+0100 (Hora de verano romance)
And prints the date in the datepicker. But if I add a date like "05/05/2013" then:
Wed Feb 13 2013 00:00:00 GMT+0100 (Hora de verano romance)
Mon Feb 25 2013 00:00:00 GMT+0100 (Hora de verano romance)
Fri Mar 01 2013 00:00:00 GMT+0100 (Hora de verano romance)
Sun May 05 2013 00:00:00 GMT+0200
You will see? The new date its diffent of the other. And in this case, the date are not highlited in the datepicker. Anyone knows why?