Wicket
  1. Wicket
  2. WICKET-4159

Javascript error when loading datepicker

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.18
    • Fix Version/s: 1.4.20
    • Component/s: wicket-datetime
    • Labels:
      None
    • Environment:
      All browsers

      Description

      Javascript error in datepicker when it's loaded.

      Current check is:

      var e = Wicket.$('id815Dp'); if (e != null && typeof(e.parentNode) != 'undefined' && typeof(e.parentNode.parentNode != 'undefined')){
      e.parentNode.parentNode.removeChild(e.parentNode);
      YAHOO.wicket.id815DpJs.destroy();
      delete YAHOO.wicket.id815DpJs;

      should be like:

      var e = Wicket.$('id815Dp'); if (e != null && typeof(e.parentNode) != 'undefined' && typeof(e.parentNode.parentNode != 'undefined'))

      { e.parentNode.parentNode.removeChild(e.parentNode); YAHOO.wicket.id815DpJs.destroy(); delete YAHOO.wicket.id815DpJs; }

      I miss the brackets in the current, now you get an javascript exception on line 'YAHOO.wicket.id815DpJs.destroy(); ', because YAHOO.wicket.id815DpJs does not exist.

      1. datepicker_javascript.patch
        1.0 kB
        Frank Klein Koerkamp

        Issue Links

          Activity

          Frank Klein Koerkamp created issue -
          Frank Klein Koerkamp made changes -
          Field Original Value New Value
          Attachment datepicker_javascript.patch [ 12500164 ]
          Frank Klein Koerkamp made changes -
          Link This issue is related to WICKET-3400 [ WICKET-3400 ]
          Igor Vaynberg made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Igor Vaynberg [ ivaynberg ]
          Fix Version/s 1.4.20 [ 12318545 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Igor Vaynberg
              Reporter:
              Frank Klein Koerkamp
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development