Hi,
Sorry about the console.log statement - I should have removed that...
I'm afraid I don't have IE7 here to test with... Can you confirm that
you experience the problem on my demo page:
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html
If you do and can give me any further information from the error then I
can look into it. If the problem doesn't exist on my page then can you
post a link to your page and we can try and look into it...
Thanks,
Kelvin :)
Vincent Majer wrote:
another error fixed, in the jquery.datepicker.js, line 332
i've commented console.log(c) and it runs in IE6
BUT.. (arghh)
I've still got error.. on IE 7 !!! when the page loads :
Line 790
car 1
Syntax Error
nobody uses this great plugin ??
Vincent Majer a écrit :
ok, i've found an error in my date_fr.js, it's ok now..
When i load the page i don't have an error showing in IE6, BUT...
When i click the calendar icon, i've got another pretty error message :
Line 333
Car 4
Erreur : "console" est indéfini
Code : 0
... ??
Does anyone know what's this error ?
Vincent Majer a écrit :
Hi,
first, sorry for my english.. not perfect..
second point, i should say thanks to kelvinluck for this great jquery
plugin, the DatePicker V2 !
I'm trying to use it.. and i have some problems with IE6..
I've used the source from this page of example :
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html
But it seems the date.js file makes IE6 finds an error.. so it
doesn't work..
here is my code :
First, the scripts to include :
<script type='text/javascript' src='/js/jquery-1.1.2.js'></script>
<script type="text/javascript" src="/js/date.js"></script>
<script type="text/javascript" src="/js/date_fr.js"></script>
<script type="text/javascript"
src="/js/jquery.dimensions.pack.js"></script>
<!--[if IE]><script type="text/javascript"
src="/js/jquery.bgiframe.js"></script><![endif]-->
<script type="text/javascript" src="/js/jquery.datePicker.js"></script>
<link rel="stylesheet" type="text/css" media="screen"
href="/css/datePicker.css">
And then :
<script type="text/javascript" charset="utf-8">
$(function()
{
// initialise the "Select date" link
$('#date-pick').datePicker(
// associate the link with a date picker
{
createButton:false,
startDate:'18/05/2007',
endDate:'11/12/2007'
}
).bind(
// when the link is clicked display the date picker
'click',
function()
{
updateSelects($(this).dpGetSelected()[0]);
$(this).dpDisplay();
return false;
}
).bind(
// when a date is selected update the SELECTs
'dateSelected',
function(e, selectedDate, $td, state)
{
updateSelects(selectedDate);
}
).bind(
'dpClosed',
function(e, selected)
{
updateSelects(selected[0]);
}
);
var updateSelects = function (selectedDate)
{
var d = selectedDate.getDate();
var m = selectedDate.getMonth();
var y = selectedDate.getFullYear();
($('#d')[0]).selectedIndex = d - 1;
($('#m')[0]).selectedIndex = m;
($('#y')[0]).selectedIndex = y - 2007;
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
.bind(
'change',
function()
{
var d = new Date(
$('#y').val(),
$('#m').val()-1,
$('#d').val()
);
$('#date-pick').dpSetSelected(d);
});
// default the position of the selects to today
var today = new Date();
($('#d')[0]).selectedIndex = today.getDate() - 1;
($('#m')[0]).selectedIndex = today.getMonth();
($('#y')[0]).selectedIndex = today.getFullYear() - 2007;
// and update the datePicker to reflect it...
$('#d').trigger('change');
});
</script>
It works well with Firefox But IE6 complains about a missing "]" on
line 7, car 94.. code : 0.. i don't know what to do to make it work..
and that line/char reference doesn't mean anything.. BUT the error
message changes when i remove the date.js from the called scripts.. ?
Any helps or advices .. ?
Thanks !!