Make datepicker compatabile with IE8.

Issues:
 IE8 splice does NOT modify the array (despite microsoft's documentation). Propery way to clear list in IE8 (and works all elsewhere) is not splice(0) but .length = 0. Also modified the remove function to delete the requested index, and rebuild the array.