Since the upstream of our calendar library seems to be relatively unmaintained, I have looked around a bit and stumbled over a jquery calendar plugin: http://marcgrabanski.com/code/jquery-clean-calendar/
I don't think we should try to replace what we currently have in a hurry, and I also think the plugin doesn't look as nice as what we currently have, but if somebody has some spare time (meaning: currently not me) it could be worth to have a look at it ...

Comments

Anonymous’s picture

There is a new datepicker in jquery with many features: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/

nedjo’s picture

IMO we should replace jscalendar with this new, supported date picker, even if it means losing some features.

In the short term, we could consider supporting both.

Anyone want to take on coding a jQuery.datePicker module, based on jscalendar?

anders.fajerson’s picture

subscribing

nedjo’s picture

See http://drupal.org/node/146454. I'm planning to remove jscalendar from Javascript Tools. Ideally we would have a replacement first, but I don't think we can wait indefinitely, as, with IE7 increasingly adopted, jscalendar is aging fast.

killes@www.drop.org’s picture

Does anybody know if the calendar from kevinluck.com will work with the jQuery version we ship with Drupal 5?

anders.fajerson’s picture

Good question. I just tried - and no, it doesn't work. Have to check with an unpacked version to see what fails.

ray007’s picture

I wouldn't consider requiring to upgrade jquery a showstopper.

nedjo’s picture

Probably this is what we should use--or just wait on, Ted may produce a module.

http://tedserbinski.com/jcalendar/

nedjo’s picture

That link didn't work, here's the correct one:

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

anders.fajerson’s picture

Except for jcalendar supporting older versions of jquery I couldn't see (from a quick look) why it would work better than datePicker.

I haven't tried it myself but http://drupal.org/project/jquery_update might be an option if the calendar choosen doesn't support older versions of jQuery.

I've been playing with a Google Calendar-like time/datePicker with the avpoll module in mind. Altough I haven't come that far the idea is to turn the standard "YYYY-MM-DD HH:MM:SS +HHMM" input field into two fields , one with a datapicker and one with a timepicker. A demo of the UI is here: http://labs.perifer.se/timedatepicker/

ray007’s picture

I kind of like the little icons to click on for a picker to open, so I'm not a big fan of opening the picker automatically when clicking in the date textfield. Having (optionally?) split date and time to 2 fields is a good idea.

iMarc’s picture

Category: task » feature

Hello drupal community! I am the main author of jQuery Calendar.. thanks for suggesting using it. One thing you will notice about Keith and I's calendar is that everything is customizable. You can change almost any setting easily and customize the entire look and feel of it via CSS.

If you have any suggestions for jquery calendar I could custom build features to benefit the drupal community.

What do you like in the other calendars that jquery calendar doesn't already have? What features would you want in order for it to be used in drupal? Thanks for your feedback in advance.

ray007’s picture

@Marc: Hello and welcome, nice to have you here.
I've been looking at the demos for jquery calendar and cleancalendar. Just a few comments:

  • I assume having the button with a nice little icon instead of the 3 dots should be easy?
  • What I didn't like is that I have to click "close" instead of the calendar closing when i click somewhere else in the page.
  • I guess some people prefer the "next month" and "previous month" links from clean calendar instead of the drop-downs for month and year in jquery calendar. Not yet sure what I like better myself ;-)

I'm not the maintainer of this module here, so take my comments as "from somebody interested in the topic", but nothing more.

PS: unrealistic wish - would it be possible to mark holidays in the popup if one had some data? Thought came just to me since I almost missed tomorrow being a holiday ...

bm123’s picture

A slider bar for the time picker and maybe the date picker would be nice.

iMarc’s picture

@ray007

Button icon added.
Click somewhere on the page and it closes!
Next and previous are on both the clean calendar and this one. The only different is the jQuery calendar also has the drop downs.
Your "unrealistic wish" has been added. On the demo page you can see that national holidays have been added.

Check out the jQuery Calendar page to see all of these updates!

ray007’s picture

@marc:
cool, thanks, I really like what I see on your demo page.

Now I only hope somebody will pick up and package your great work into this module since I'm a bit overworked right now.
Will give it a try myself if nobody else does something within the next few days and I find time to do it.

michelle’s picture

Is there any way to get this calendar to work with having separate dropdowns for year month and day? Like the Event module has by default? Currently, the jscalendar being used with Event replaces the dropdowns with a single textbox. It would be nice to have one that just filled in the three instead.

Michelle

nicolash’s picture

subscribe

nathanpalmer’s picture

I found the IE7 problem that people have been talking about with jscalendar last night and since I have a demo of this project on wednesday I hacked together a datepicker based on Kelvin Luck's jQuery datepicker (and the google one, it's the same thing.) I duplicated the jscalendar and made modifications. I believe all jscalendar specific stuff is out of there although you might find a reference to it here and there. This doesn't have any options that you can pass to it although I'm sure it would be fairly easy to make it do that. But it's working great in Firefox and IE7. Safari however doesn't pull up the calendar.

http://www.nathanpalmer.com/files/datepicker.zip

Nathan

iMarc’s picture

@Michelle: Are you talking about jQuery calendar or some the calendar that is currently in drupal? It sounds like you need one that populates three textboxes with year, month and day?

@Nathan: I'm wondering why you decided to use another calendar besides jQuery calendar when I am here and willing to help you guys with a solution that works best for the drupal community. ray007 asked for a bunch of features and we added them.

michelle’s picture

@Michelle: Are you talking about jQuery calendar or some the calendar that is currently in drupal? It sounds like you need one that populates three textboxes with year, month and day?

I'm talking about jscalendar, which is what this issue is about. The Event module uses jscalendar now and it makes sense for Event to go with whatever jsTools decides to replace it with for consistency. The problem with the current jsCalendar is that it replaces Event's 3 dropdown box date field with a single textbox. What I would like to see is the three drop downs kept and have the pop up calendar fill those in. So it would be nice if whatever jscalendar is replaced with had that option.

Michelle

csc4’s picture

@iMarc - thanks so much for adding the extra features for Drupallers!

I really hope a techie this side can liaise with you to get this into the mainstream Drupal - would be really great.

csc4’s picture

@iMarc - thanks so much for adding the extra features for Drupallers!

I really hope a techie this side can liaise with you to get this into the mainstream Drupal - would be really great.

wim leers’s picture

I have implemented Ted Serbinski's jCalendar in date.module. See this issue.

ray007’s picture

Having a quick look at the 2 demos I like Marc's jQuery calendar better.
If only the day had more than 24 hours ...

csc4’s picture

+1 for iMarc's offer too - especially as he's kindly offered to produce any Drupal specificness needed..

nicolash’s picture

One thing that doesn't seem to get considered is multiple dates. The original DynArch calendar does actually support that, but the functionality never made it into its Drupal jsCalendar version.

Clicking or CTRL/CMD-clicking any number of dates would be great. From a form interface perspective one way of handling this could be that as soon as more than one date is selected, the input text field (in the case of jQuery Calendar) could turn into a textarea, adding additional dates to the end of a line break delimited list.

Ideally Date module would handle such a list just as it would handle multiple date fields. The non-JS version of this would be just the textarea that requires a certain date format in the same line break delimited list. I think people are quite used to this from bulk importing other stuff, such as email addresses etc.

Even if Date module doesn't support this, the data could be massaged upon submit as if one would have simply submitted multiple CCK dates, but with a much better user interface.

rjleigh’s picture

Now, if we could see a drop-down calendar combined with a time entry field like this:

http://labs.perifer.se/timedatepicker/

and it all put data into date field, I'd be ecstatic.

drue’s picture

Don't use IE 7 as an excuse to replace jscalendar. jscalendar works fine with IE 7 - the IE 7 bug is located somewhere in the drupal module code. I spent some time looking, but couldn't figure out the problem. I suspect it's in jscalendar.js.

I'm sure if someone familiar with the module looked at it, it's a trivial bug (well, as trivial as a javascript bug can be).

Even if you are replacing it, this is a trivial bug that should be plugged for existing users ASAP.

-drue

nedjo’s picture

@drue

Please see this issue http://drupal.org/node/150715 and provide details there, e.g. specific error messages (or open a different issue for the bug you're reporting if it is a different problem). The message reported in that issue suggests the problem is in the jscalendar library.

bojanz’s picture

@Nathan Palmer
Did you update your code since june? I am interested in using your code in a project of mine, so I was wondering if you solved the safari bug.

nedjo’s picture

Status: Active » Fixed

There is now a date picker implemented in the date module, http://drupal.org/node/157127#comment-297784. I plan to discontinue jscalendar after the current 5.x cycle.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.