Author: pyaschenko
Date: 2007-07-18 09:32:24 -0400 (Wed, 18 Jul 2007)
New Revision: 1673
Modified:
branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
small changes
Modified:
branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
---
branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-07-18
13:18:52 UTC (rev 1672)
+++
branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-07-18
13:32:24 UTC (rev 1673)
@@ -136,7 +136,8 @@
this.params = parameters;
if (!this.params.showWeekDaysBar) this.params.showWeekDaysBar = true;
if (!this.params.showWeeksBar) this.params.showWeeksBar = true;
- if (this.params.monthLabels) this.params.monthLabels.push(this.params.monthLabels[0]);
+ if (this.params.monthLabels) this.params.monthLabels.push(this.params.monthLabels[0]);
+ if (!this.params.datePattern) this.params.datePattern = "MMM d, y"
this.currentDate = this.params.currentDate ? this.params.currentDate : new Date();
this.selectedDate = this.params.selectedDate;
@@ -157,7 +158,7 @@
this.daysData = {startDate:null, days:[]};
this.days = [];
- var htmlTextHeader = '<input id="'+this.id+'InputSelectedDate"
name="'+this.id+'InputSelectedDate" type="hidden"
value="'+this.getSelectedDateString()+'"/>\n' +
+ var htmlTextHeader = '<input id="'+this.id+'InputSelectedDate"
name="'+this.id+'InputSelectedDate" type="hidden"
value="'+this.getSelectedDateString(this.params.datePattern)+'"/>\n'
+
'<input id="'+this.id+'InputCurrentDate"
name="'+this.id+'InputCurrentDate" type="hidden"
value="'+this.getCurrentDate().format("MM/y")+'"/>\n'
+
'<table border="0" cellpadding="0"
cellspacing="0" class="calendar_exterior"><tbody>\n';
var htmlControlsHeader = '<tr><th colspan="8"
id="'+this.id+':header"></th></tr>'
@@ -319,7 +320,7 @@
this.selectedDateElement = obj;
Element.addClassName(obj, "Selecteddayclass");
- $(this.id+'InputSelectedDate').value=this.getSelectedDateString();
+ $(this.id+'InputSelectedDate').value=this.getSelectedDateString(this.params.datePattern);
this.renderFooter();
} else {
if (daydata._month==-1) this.prevMonth(); else this.nextMonth();
@@ -653,7 +654,7 @@
return Calendar.getControl(context, null, "Today", "today");
};
Calendar.selectedDateControl = function(context) {
- var value =context.calendar.getSelectedDateString("dd/MM/y");
+ var value = context.calendar.getSelectedDateString(context.calendar.params.datePattern);
return value;
};
Calendar.helpControl = function(context)
@@ -703,7 +704,7 @@
[
new E('tr',{},
[
- new E('td',{'class': 'calendar_toolfooter'},
+ new E('td',{'class': 'calendar_toolfooter', 'style':
'white-space:nowrap'},
[
new ET(function (context) { return
Richfaces.evalMacro("Calendar.selectedDateControl", context)})
]),
Show replies by date