views:

158

answers:

1

Hi, I am using this plugin:

http://tedserbinski.com/jcalendar/index.html

The plugin is supposed to accept a user defined startdate, but I cant manage to get it to work.

This is the header of the js file:

var _drawCalendar = function(dateIn, a, day, month, year) {

  var today = new Date();


 if (dateIn == undefined) {
  // start from this month.
  d = new Date(today.getFullYear(), today.getMonth(), 1);
  year.val(today.getFullYear());
  month.val(today.getMonth()+1);
  day.val(today.getDate());

 }
 else {
  // start from the passed in date
  d = dateIn;
   d.setDate(1);
 }

And i am calling the calendar plug with the following line, that actually is missing something. I have tried hundreds of diffrent code snippets, but I have gived up :(

$('fieldset.jcalendar').jcalendar();

Best regards, Joakim

+1  A: 

Any particular reason you aren't using the DatePicker that comes with jQuery UI? The page you linked even says that the project has been superceded by jQuery UI.

Topher Fangio