Fork me on GitHub

jscalendar date picker & z-index  Bottom

Go to page 1 - 2 [+1]:

  • does the z-index of a div affect the ability of the jscalendar date picker to apply the date?

    I have run into this issue in modules with jscalendar, that when the z-index of the div is adjusted in my theme so that drop menus, embedded objects all play nice together, the jscaledar is the one most prone to not come out of the adjustments working right. When it goes bad the jscalendar looks like it is floating right yet will not apply the date to the field that is intended to.

    I know that the jscalendar is in use in postcalendar, timeit, and lobby, maybe if some of those developers might give some tips on working with it.

    Paul
  • don't know if it's the same issue but using the latest version of BlankTheme in Zikula 1.2.2, the "jscalendar" didn't pick the date anymore:

    Firebug says :
    ERROR : too much recursion - calendar.js (line 1797)
    d.__msh_oldSetFullYear(y);

    Philippe
  • yikes that does not sound good. In what module? I'm not too fond of jscalendar myself and for News I've used a prototype based calendar script, that is also more unobtrusive.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • it's an in-house module... BUT I am just using the available pnform plugin:

    Code

    <!--[pnformdateinput id="activity_start" mandatory="1" defaultValue="custom" initDate=$activity.start|pndate_format:"%Y-%m-%d"]-->


    Tried that but the year cannot be changed anymore...
  • OK, here is the patch and the explanation: http://jira.opensymphony.com/browse/WW-1429
    Are you guys facing the same issue?
    If yes, I can submit a ticket?



    edited by: pnFilip, datetimebrief
  • I am using Florian's Lobby module; but it happened in TimeIt, and at one point PostCalendar too, the later having recovered their ability once I narrowed the z-index changes to particular IDs in the the theme. As to my theme, it happened not only in my theme but BlankTheme as well, so it makes me think that it is simply z-index related.

    I am a novice user of Firebug and so far am not able to see the particular error - or even if it is the same one pnFilip mentioned. I should probably ask Florian too, but it seemed something core enough to post here.

    the article template uses the Smarty call:

    Code

    pnformdateinput id="date" mandatory="1" includeTime="1"


    I looked at my page head source and found the following called:

    Code

    link rel="stylesheet" href="javascript/jscalendar/calendar-win2k-cold-2.css" type="text/css"
    script type="text/javascript" src="javascript/jscalendar/calendar.js" /script
    script type="text/javascript" src="javascript/jscalendar/lang/calendar-en.utf8.js" /script
    script type="text/javascript" src="javascript/jscalendar/calendar-setup.js"  /script


    When I went and looked at jscalendar I had a hard time seeing how it is configured - there was a calendar.php file, a calendar-setup.js, and various CSS files. seemed to me as though the calendar.php is setup to use calendar-win2k-cold-1.css by default.

    In my page source as well where the calendar is called there is this :

    Code

    p
           label for="date" Date and time of article /label : br /

         span class="date" /  input type="text" id="date" name="date" maxlength="18" class="text  date" value="2010-04-14 14:28"/ img id="date_img" src="javascript/jscalendar/img.gif"  class="clickable" alt="Select date" / /span  script type="text/javascript"
                //  ![CDATA[
                Calendar.setup(
                {
                    inputField : "date",
                        ifFormat : "%Y-%m-%d %H:%M",
                        showsTime      :    true,
                        timeFormat     :    "24",
                        singleClick    :    false,
                        button : "date_img",
                        firstDay: 0
                    }
                );
                // ]]
                 /script br /
         span class="lobby_important" if you specify a future date the article will automatically be displayed after the specified timestamp /span
     /p


    when I looked in calendar-setup.js "single-click" is set to "true" -

    I am wondering if I am looking in all the wrong places - because the results are showing changes I do not see the source for. Not to mention that the question for me still remains how is the z-index involved, and I know in javascript the zindex is noted differently for style information than the HTML version, but there was no style info in the calendar js files that I saw. In the CSS files the only z-index statment is at "class=calendar class=combo" and the z-index is 100 . Eh, maybe it is not an issue with z-index - but when I have returned my other template divs style to no noting of z-index (not even z-index:0;) the other jscalenders became functional again.

    Paul

    I had to strip out some of the brackets for the source code because the forum codetype did not seem to work
  • I am getting the too much recursion error too
  • the line numbers for that patch are a little wanky - calendar.js ends at line 1808 - could be a simple transposition error - still how to fix it in the mean time?

    Paul
  • OK you are right, it's not very clear, just try to replace the following:

    line 1794:

    Code

    Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;

    comment out this line if you prefer with two slashes at the beginning.

    with :

    Code

    if( Date.prototype.__msh_oldSetFullYear == null ) {
        Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
    }


    Hope it helps you too
  • Yea, that's what seems to work - thanks pnFilip - and it works in all three TimeIT, PostCalendar & Lobby

    winke

    Paul
  • please submit this fix to the core implementation of jscalendar.
  • If I'm not mistaken jscalendar is being replaced anyway isn't it?

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Quote

    If I'm not mistaken jscalendar is being replaced anyway isn't it?

    Well if nothing else gets replaced in it, let the CSS be disposed of in the manner fitting of a relic who once was so young and fresh. but has grown old and unchanging like Dorian Gray. prost I know many would say what more do you need in a utility; we won't go there considering it needs to be fixed. But that crpCalendar picker has a profile on her I could see through a few dates,( icon_evil ) if that is not improper or too queer. icon_lol Ok, enough with the goofy smiles or someone will peitsche out the sniper and angel me



    edited by: TakeIT2, datetimebrief
  • HalbrookTech

    If I'm not mistaken jscalendar is being replaced anyway isn't it?

    not that I am aware of. ticket?
    still - if true - worth fixing for 1.3
  • Or Zikula 1.2.3 which could be released in a few days. So please create a ticket soon.

Go to page 1 - 2 [+1]:

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