Project

General

Profile

Bug #3564 ยป 3564.patch

krileon, 25 June 2012 21:12

View differences:

components/com_comprofiler/js/calendardateinput.js
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();
}
......
}
// The calendar object
function cbcalCalendarObject(DateName, DateFormat, DefaultDate, YearDropDownStop) {
function cbcalCalendarObject(DateName, DateFormat, DefaultDate, YearDropDownStop, YearMin, YearMax) {
/* Properties */
this.hiddenFieldName = DateName;
......
this.previous = null;
this.next = null;
this.yeardropdownstop = YearDropDownStop;
this.yearmin = YearMin;
this.yearmax = YearMax;
/* Methods */
this.setPicked = cbcalSetPickedMonth;
......
YearMax = null;
}
// Creates the calendar object!
eval(DateName + '_Object=new cbcalCalendarObject(\'' + DateName + '\',\'' + DateFormat + '\',\'' + DefaultDate + '\',\'' + YearDropDownStop + '\')');
eval(DateName + '_Object=new cbcalCalendarObject(\'' + DateName + '\',\'' + DateFormat + '\',\'' + DefaultDate + '\',\'' + YearDropDownStop + '\',\'' + YearMin + '\',\'' + YearMax + '\')');
// Determine initial viewable state of day, year, and calendar icon
if ((Required) || ( (arguments.length >= 4) && (DefaultDate!=''))) {
var InitialStatus = '';
    (1-1/1)