6 Replies Latest reply on Dec 18, 2007 1:41 PM by pyaschenko

    rich:calendar JS error

    juanignaciosl

      After upgrading to 3.1.3.CR2 calendar stopped working, both at Firefox and IE7.

      This is the Javascript error:

      "template has no properties"

        • 1. Re: rich:calendar JS error
          juanignaciosl

          This is part of the generated HTML code:

          new Calendar('idFormPlantilla:fechaHasta', {dayListTableId: 'idFormPlantilla:fechaHastaDay',
          274 weekNumberBarId: 'idFormPlantilla:fechaHastaWeekNum',
          275 weekDayBarId: 'idFormPlantilla:fechaHastaWeekDay',
          276 currentDate: new Date(2007,11,17),
          277 selectedDate: null,
          278 datePattern: 'dd/MM/yyyy',
          279 jointPoint: 'bottom-left',
          280 direction: 'bottom-right',
          281 toolTipMode:'batch',
          282 boundaryDatesMode:'inactive',
          283 popup: true,
          284 enableManualInput: true,
          285 showInput: true,
          286 disabled: false,
          287 ajaxSingle: true,
          288 verticalOffset:0,
          289 horizontalOffset: 0,
          290 style:'z-index: 3; ',
          291 firstWeekDay: 1,
          292 minDaysInFirstWeek: 1,
          293 todayControlMode:'select',
          294 showScrollerBar:true,
          295 showWeeksBar:true,
          296 showWeekDaysBar:true,
          297 showApplyButton:false,
          298 className: text,


          The last line is the wrong one, it should say ...'text' instead of text

          • 2. Re: rich:calendar JS error
            juanignaciosl

            Even more, the simplest calendar I can imagine...

            <rich:calendar value="#{proyectoFiltro.fechaSolicitud.desde}"></rich:calendar>


            throws another JS error:

            template has no properties
            http://jagita46w256.itacyl.red:7575/gnomos/faces/a4j_3_1_3-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript
            Line 30

            • 3. Re: rich:calendar JS error
              juanignaciosl

              SOLVED [auto reply]: I found the conflicting code. In my pages I was executing the following script:

              CalendarContext.prototype.todayControl = CalendarView.getControl("Hoy", "today");

              This is a workaround for an old bug related to spanish location. Removing it solves the problem (but it's f****ng strange it does!).

              • 4. Re: rich:calendar JS error
                ayanul

                hi, juanignaciosl
                I cannot reproduce this bug
                Update to 3.1.3-GA

                • 5. Re: rich:calendar JS error
                  juanignaciosl

                  I've upgraded and works after removing this code I was using:
                  CalendarContext.prototype.todayControl = CalendarView.getControl("Hoy", "today");

                  It even made an empty <rich:calendar /> stop "popping".

                  Thank you anyway!

                  • 6. Re: rich:calendar JS error
                    pyaschenko

                    Now for 3.1.3 version you can use this trick:

                    CalendarContext.prototype.todayControl = function (context) { return (context.calendar.todayControlMode!='hidden' ? CalendarView.getControl("TodayLabel", CalendarView.toolButtonAttributes, "today") : "");};