i have an array of date. got it from mysql database and already converted to js date. the date i got from db are converted to string date like this.
I've read from this about php to js date : Send PHP date to javascript date Format
let say this is the php date that i use ajax and got response
data = ["Sun Apr 27 2014 22:14:25 +0100","Thu May 29 2014 22:14:25 +0100"]
i have a global namespace. var myDate = {};
the data
array was converted to js date like this:
var arr = [];
$.each(data, function(k,v){
arr.push = new Date(v);
});
myDate.list = arr;
this is the bootstrap datepicker code:
$('#bdate').datepicker('setDates', myDate.list);
addtitional info: I'm using <div id="bdate"></div>
so it will display an inline datepicker
the issue is it seems to be not setting the dates on the picker.
here is the fiddle: http://jsfiddle.net/faiz_qlo/jPphC/