Fork me on GitHub

pnformdateinput problem since upgrading to 1.2  Bottom

  • Since updating to 1.2 I've had a problem with using pnformdateinput in a pnForm. The calendar icon appears where it should, but it's not an active clickable link. My template code looks like this:

    Code

    <!--[pnformdateinput id=purchasedate mandatory=1 group=ownership]-->


    and the code it generates

    Code

    <input type="text" id="purchasedate" name="purchasedate" maxlength="12" class="text  date" value="2009-10-01"/> * <img id="purchasedate_img" src="javascript/jscalendar/img.gif"  class="clickable" alt="Select date" /></span>
                // <![CDATA[
                Calendar.setup(

                {
                    inputField : "purchasedate",
                        ifFormat : "%Y-%m-%d",
                        button : "purchasedate_img",
                        firstDay: 0
                    }
                );
                // ]]>


    Now, obviously the CDATA part is commented out, so I tried to fix it by uncommenting that in the pnformdateinput plugin, but it didn't help. I also note that there's a line in head:

    Code

    /* <![CDATA[ */ document.location.entrypoint="index.htm"; document.location.pnbaseURL="http://localhost/WrenchReminder/";  /* ]]> */


    But I don't know if it has anything to do with the calendar.

    Suggestions? The control fails with other themes than the one I'm using too.



    edited by: bronto, datetimebrief
  • that plugin has had some work since 1.2 for 1.2.1. back up your copy and replace it with this one and see if that fixes your problem.
  • Thanks, but no it does not. FWIW, the CDATA in that file is commented out as well.
  • I was going to post a unified diff of the changes between versions, but they are quite massive, being almost 300 lines long. Longer than the file itself.

    Can someone confirm - or not - that this works in a base installation of zk 1.2? At least then I'd know it's my problem and not a bug in 1.2 itself.

    Thanks in advance. This has become a show stopper for one of my new sites, where a date field is required.
  • CDATA is commented out because it's the way to handle the JavaScript embedded into valid XHTML. All the contents inside CDATA are not parsed by the validator, and it wrapps the JS. There's a problem with JSCalendar and the german language, because the DateFormat is different and DateUtil doesn't process the %Y.%m.%d correctly. In your example I don't see that issue...

    The issue can be caused by the wrong lang EN file:
    Grab this calendar-en.utf8.js and put it in/javascript/jscalendar/lang. The Firebug's console enabled may show you that error message, use it more often icon_wink

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Yes, that did it! FWIW, that file didn't replace a file, there wasn't one named like that already. There was a _US variation of en, but not this exact one.

    New problem though, on my theme the popup calendar is "whacked". See link:
    http://robbrandt.duckbox.org/mediashare/vfsdb/a0qre48ytehxyjygl699kbyy9oh118-pre.jpg
    Viewing it with Seabreeze looks OK though, so it must be my theme. What would screw this up?
  • that means that your theme's style.css is defining classes that are used in the calendar.

    additionally, the first issue (solved by adding that file) was also fixed in zikula 1.2.1, I just pointed you to only one of the files. my mistake.
  • Again
    Firebug can show which CSS is the conflictive one and where, just Inpect the popup icon_wink

    --
    - Mateo T. -
    Mis principios... son mis fines
  • 0 users

This list is based on users active over the last 60 minutes.