Please find attached a jQuery-alised jscalendar.js file. Use as a simple drop-in replacement.

CommentFileSizeAuthor
#4 jscalendar.zip231.67 KBjjeff
jscalendar.js1.24 KBcooperaj

Comments

nedjo’s picture

Nice. thanks!

The whole jstools package needs to be reworked for jQuery and the hoped-for jQueryization of Drupal core. This is a good start.

m3avrck’s picture

Version: 4.7.x-1.x-dev » master

Nedjo, I concur. I plan to really help with the rewrite of Jquery.

Here's the new Jquery calendar plugin I'd like to build off of: http://kelvinluck.com/assets/jquery/datePicker/

yched’s picture

It seems the jQuery date picker you mention is far from offering all the features that JsCalendar has.
I think the "drupalization" part of this module should be translated to jQuery, but the JsCalendar library should be kept.

jjeff’s picture

StatusFileSize
new231.67 KB

Here's a FULL WORKING version of JSCalendar for Drupal 5.

nedjo’s picture

Status: Needs review » Reviewed & tested by the community

Great, thanks for doing this! jjeff, please go ahead and commit this. If any issues arise we can deal with them as separate follow-up issues. If you feel this is ready please go ahead and register the 5.0 branch (just for jscalendar of course--the other parts of jstools still need updating).

karens’s picture

Someone tried this with the HEAD version of the date module and reported a problem at http://drupal.org/node/102788. I tried the patch, too, and had the same problem. It seems to work fine, but is ignoring the format and time settings and using the defaults instead.

karens’s picture

And just for reference, I tried to set the form element as:

[#jscalendar_ifFormat] => %m/%d/%Y
[#jscalendar_showsTime] => false
[#jscalendar_timeFormat] => 24

and my source code shows:

<input type="hidden" name="field_date[0][value_jscalendar][ifFormat]" id="edit-field_date-0-value_jscalendar-ifFormat" value="%m/%d/%Y"  />
<input type="hidden" name="field_date[0][value_jscalendar][showsTime]" id="edit-field_date-0-value_jscalendar-showsTime" value="false"  />
<input type="hidden" name="field_date[0][value_jscalendar][timeFormat]" id="edit-field_date-0-value_jscalendar-timeFormat" value="24"  />
nedjo’s picture

I applied the patch - thanks cooperaj and jjeff! - after making a few tweaks, including an attempt (untested) to fix the issue Karen identified.

Tobias Maier’s picture

Status: Reviewed & tested by the community » Fixed
karens’s picture

Status: Fixed » Active

I'm still getting the wrong format in the date module (latest cvs of everything). It still insists on using the full ISO format and showing the time. Here is what is in my form:

Array
(
    [field_date] => Array
        (
            [#tree] => 1
            [0] => Array
                (
                    [value] => Array
                        (
                            [#type] => textfield
                            [#title] => date
                            [#default_value] => 
                            [#required] => 0
                            [#description] => 
                            [#weight] => 0
                            [#attributes] => Array
                                (
                                    [class] => jscalendar
                                )

                            [#jscalendar_ifFormat] => %m/%d/%Y
                            [#jscalendar_showsTime] => false
                            [#jscalendar_timeFormat] => 24
                        )

                )

        )

)
nedjo’s picture

Assigned: Unassigned » nedjo

Thanks for pointing this out Karen. I'll test and try to get this working.

nedjo’s picture

Status: Active » Fixed

Marking the original issue fixed. Let's fix the formatting issue here: http://drupal.org/node/102788.

Anonymous’s picture

Status: Fixed » Closed (fixed)