Reputation: 188
I have a problem with the use of the datepicker in Internet explorer. In all other browsers there isn't a problem, just with IE.
the code I use is this:
<script type="text/javascript">
( function($) {
$(document).ready( function() {
$("#slider").easySlider({
auto: true,
continuous: true
});
$( ".tcal" ).datepicker({
changeMonth: true,
changeYear: true,
showOn: "both",
minDate: '-122Y',
maxDate:'0',
yearRange: "-122",
buttonImage: "/images/kalender3.gif",
buttonImageOnly: true
});
$( ".tver" ).datepicker({
changeMonth: true,
showOn: "both",
buttonImage: "/images/kalender3.gif",
buttonImageOnly: true,
minDate: '0',
maxDate: '+1Y',
});
$('.tcal,.tver').datepicker('option', $.extend({showMonthAfterYear: false},$.datepicker.regional['<?php print(($lng=='1')?'nl':'fr');?>']));
$('.tcal,.tver').datepicker( "option", "dateFormat", "dd/mm/yy" );
});
} ) ( jQuery );
</script>
But this won't work in Internet Explorer. On my home page I have the slider, and it also won't work anymore. But it will work when I place those parts in comment:
$( ".tcal" ).datepicker({
/* changeMonth: true,
changeYear: true,
showOn: "both",
minDate: '-122Y',
maxDate:'0',
yearRange: "-122",
buttonImage: "/images/kalender3.gif",
buttonImageOnly: true*/
});
$( ".tver" ).datepicker({
/*changeMonth: true,
showOn: "both",
buttonImage: "/images/kalender3.gif",
buttonImageOnly: true,
minDate: '0',
maxDate: '+1Y',*/
});
Does someone knows where I made a mistake?
Upvotes: 1
Views: 2653
Reputation: 11375
Some versions of IE don't allow trailing commas. If you remove the comma after
maxDate: '+1Y'
does it work?
Upvotes: 2