...

View Full Version : help on javascript



kevin3
08-27-2010, 08:31 AM
I have these lines of codes, but I can not get the calendar shown in the
browser. can anyone help me on this. Thanks!

<html>
<head>
$(document).ready(function()
{

$('#calendar').datepicker({
dateFormat: 'yy-mm-dd',
changeYear: false,
changeMonth: false,
minDate: '-1m',
maxDate: '+2m',
});
</head>

<body>
<div id='calendar'>
</div>

</body>
</html>

abduraooft
08-27-2010, 08:56 AM
Don't you need to link the related javascript library file to your page?

santhoshj400
08-27-2010, 09:05 AM
Hi
1. Download jQuery, either version 1.0.4 or 1.1.2
2. Download jCalendar — source or compressed or svn checkout
3. Download optional jCalander CSS
4. Add 3 form selects for day, month, and year with classes jcalendar-select-day, jcalendar-select-month, jcalendar-select-year
5. Wrap the 3 selects in <div class="jcalendar-selects">
6. Attach jcalendar. Example:

$(document).ready(function() {
$('fieldset.jcalendar').jcalendar();
});

7. Enjoy better usability :-)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum