我有以下javascript。这延伸了基思森林jquery日期选择器。在chrome中,如果以下警告日期值。然而,在ie 8我得到[对象,对象]
<script type="text/javascript"><!--
var defaultDate = '06/01/2011';
$(function() {
$('#inlineDatepicker').calendarsPicker({onSelect: showDate, defaultDate: defaultDate, selectDefaultDate: true, changeMonth:false, onDate: nationalDays, prevText: ' ', nextText: ' '});
});
function nationalDays(date, inMonth) {
alert(date); // doesn't return date in ie 8
}
function showDate(date) {
var start = date.toString('dd-MM-yyyy');
var url = '/events?s=' + start;
window.location = url;
}
--></script>