I am able to display datePicker calendar in one of my modules but not
able to do the same in other places.
Details:-
Source of the page where it is not working properly:-
==========================================================
<link rel="stylesheet" type="text/css" href="/path/to/datePicker.css" /
>
<script src="/path/to/js/timezonePicker.js" type="text/javascript"></
script> <script type="text/javascript" src="/path/to/js/date.js"></
script><script type="text/javascript" src="/path/to/js/
jquery.datePicker.min-2.1.1.js"></script>
<a id="date_pick"><img onClick="displayCalendar();" src="/path/to/
image" alt="Pick a Date" ></a>
===========================================================
The code in timezonePicker.js is :-
=========================================================
function displayCalendar(){
// initialise the "Select date" link
$('#date_pick')
.datePicker(
// associate the link with a date picker
{
Line "x":- createButton:false,
//startDate:(new Date()).asString()
}
).bind(
// when the link is clicked display the date picker
'click', //Commented this temporarily - datepicker
will appear if
this is uncommented
function()
{
//Display the same date which is being
displayed by the select
tags and not the current date (The date being displayed is after
timezone, daylight calculations)
var preselect = new Date(
$('#y').val(),
($('#m').val() - 1),
$('#d').val()
);
$('#date_pick').dpSetSelected(preselect.asString());
$(this).dpDisplay();
}
);
}
===============================================================
On clicking it displays the javascript error:-
$("#date-pick").datePicker is not a function (line "x" as I have
marked above)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---