# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- components/com_comprofiler/js/calendardateinput.js +++ components/com_comprofiler/js/calendardateinput.js @@ -502,8 +502,16 @@ function cbcalSetDisplayedMonth(DispYear, DispMonth) { this.displayed = new cbcalDisplayMonthObject(this, DispYear, DispMonth, 1); // Creates the previous and next month objects - this.previous = new cbcalNeighborMonthObject(this, 'Previous', this.displayed.date.getTime() - 86400000); - this.next = new cbcalNeighborMonthObject(this, 'Next', this.displayed.date.getTime() + (86400000 * (this.displayed.dayCount + 1))); + if ( ( DispMonth == 0 ) && ( DispYear == this.yearmin ) ) { + this.previous = new cbcalNeighborMonthObject(this, 'Previous', this.displayed.date.getTime()); + } else { + this.previous = new cbcalNeighborMonthObject(this, 'Previous', this.displayed.date.getTime() - 86400000); + } + if ( ( DispMonth == 11 ) && ( DispYear == this.yearmax ) ) { + this.next = new cbcalNeighborMonthObject(this, 'Next', this.displayed.date.getTime()); + } else { + this.next = new cbcalNeighborMonthObject(this, 'Next', this.displayed.date.getTime() + (86400000 * (this.displayed.dayCount + 1))); + } // Creates the HTML for the calendar if (this.formNumber >= 0) this.getDayTable().innerHTML = this.buildCalendar(); } @@ -516,7 +524,7 @@ } // The calendar object -function cbcalCalendarObject(DateName, DateFormat, DefaultDate, YearDropDownStop) { +function cbcalCalendarObject(DateName, DateFormat, DefaultDate, YearDropDownStop, YearMin, YearMax) { /* Properties */ this.hiddenFieldName = DateName; @@ -536,6 +544,8 @@ this.previous = null; this.next = null; this.yeardropdownstop = YearDropDownStop; + this.yearmin = YearMin; + this.yearmax = YearMax; /* Methods */ this.setPicked = cbcalSetPickedMonth; @@ -775,7 +785,7 @@ YearMax = null; } // Creates the calendar object! - eval(DateName + '_Object=new cbcalCalendarObject(\'' + DateName + '\',\'' + DateFormat + '\',\'' + DefaultDate + '\',\'' + YearDropDownStop + '\')'); \ No newline at end of file + eval(DateName + '_Object=new cbcalCalendarObject(\'' + DateName + '\',\'' + DateFormat + '\',\'' + DefaultDate + '\',\'' + YearDropDownStop + '\',\'' + YearMin + '\',\'' + YearMax + '\')'); \ No newline at end of file // Determine initial viewable state of day, year, and calendar icon if ((Required) || ( (arguments.length >= 4) && (DefaultDate!=''))) { var InitialStatus = '';