Author: pyaschenko
Date: 2010-12-23 07:44:56 -0500 (Thu, 23 Dec 2010)
New Revision: 20765
Modified:
trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-8622
Modified: trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2010-12-23 12:43:08
UTC (rev 20764)
+++ trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2010-12-23 12:44:56
UTC (rev 20765)
@@ -32,6 +32,11 @@
-->
<h:head>
<title>Richfaces Calendar Demo</title>
+ <script>
+ var myFunction = function(event){
+ ;
+ }
+ </script>
</h:head>
<h:body>
<h:form id="form">
@@ -44,8 +49,8 @@
dataModel="#{calendarDataModel}"
mode="#{calendarBean.mode}"
disabled="false"
- showApplyButton="#{calendarBean.showApply}" cellWidth="24px"
- cellHeight="22px" style="width:200px"
minDaysInFirstWeek="3"
+ cellWidth="24px"
+ cellHeight="22px" minDaysInFirstWeek="3"
oncollapse="return onEvent.call(this, event);"
onexpand="return onEvent.call(this, event);"
oncurrentdateselect="return onEvent.call(this, event);"
@@ -60,9 +65,13 @@
ondatemouseover="return onEvent.call(this, event);"
firstWeekDay="4"
horizontalOffset="#{calendarBean.horizontalOffset}"
- verticalOffset="#{calendarBean.verticalOffset}"
+ verticalOffset="#{calendarBean.verticalOffset}"
defaultTime="11:22:01"
valueChangeListener="#{calendarBean.doValueChangeListener}"
- currentDataChangeListener="#{calendarBean.doCurrentDataChangeListener}"
+ currentDataChangeListener="#{calendarBean.doCurrentDataChangeListener}"
+ onbeforedateselect="myFunction(event)"
+ style="width:200px;border:10px solid #000000"
+ styleClass="hello"
+ boundaryDatesMode = "scroll"
</calendar:calendar>
@@ -93,6 +102,8 @@
<f:selectItem itemLabel="d/M/yy HH:mm" itemValue="d/M/yy
HH:mm" />
<f:selectItem itemLabel="dd/M/yy hh:mm a"
itemValue="dd/M/yy hh:mm a" />
+ <f:selectItem itemLabel="dd/M/yy hh:mm:ss"
+ itemValue="dd/M/yy hh:mm:ss" />
<f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y" />
<f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"
/>
</h:selectOneMenu>
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-23
12:43:08 UTC (rev 20764)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-23
12:44:56 UTC (rev 20765)
@@ -308,6 +308,7 @@
// "inactive" or undefined - no action (default)
// "scroll" - change current month
// "select" - change current month and select date
+ // "hidden" - does not render content for boundary dates
//
// todayControlMode - today control onclick action:
// "scroll"
@@ -349,6 +350,7 @@
//
this.options.boundaryDatesMode = this.options.boundaryDatesMode.toLowerCase();
+ this.hideBoundaryDatesContent = this.options.boundaryDatesMode == "hidden";
this.options.todayControlMode = this.options.todayControlMode.toLowerCase();
// time
@@ -1319,7 +1321,7 @@
}
contentElement = (this.customDayListMarkup ? element.firstChild : element);
- contentElement.innerHTML = this.evaluateMarkup(this.options.dayListMarkup, dataobj
);
+ contentElement.innerHTML = this.hideBoundaryDatesContent &&
dataobj._month!=0 ? "" : this.evaluateMarkup(this.options.dayListMarkup, dataobj
);
if (weekdaycounter==6) weekdaycounter=0; else weekdaycounter++;