[richfaces-svn-commits] JBoss Rich Faces SVN: r2755 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Sep 5 05:03:47 EDT 2007
Author: pyaschenko
Date: 2007-09-05 05:03:47 -0400 (Wed, 05 Sep 2007)
New Revision: 2755
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
fixed small bug
in inline mode:
press today,
press next month,
select date,
press today,
reset date.
Selected date must be cleared
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-09-05 08:55:09 UTC (rev 2754)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-09-05 09:03:47 UTC (rev 2755)
@@ -1144,7 +1144,7 @@
}
},
- today: function(noUpdate) {
+ today: function(noUpdate, noHighlight) {
var now = new Date();
var nowyear = now.getFullYear();
var nowmonth = now.getMonth();
@@ -1166,7 +1166,7 @@
else
{
// highlight today
- if (this.isVisible && this.todayCellId)
+ if (this.isVisible && this.todayCellId && !noHighlight)
{
if (this.highlightEffect)
{
@@ -1250,7 +1250,14 @@
this.renderHeader();
this.renderFooter();
}
- this.today(noUpdate);
+
+ var date = new Date();
+ if (this.currentDate.getMonth()==date.getMonth() && this.currentDate.getFullYear()==date.getFullYear())
+ {
+ this.renderHeader();
+ this.renderFooter();
+ }
+ this.today(noUpdate, true);
}
}
More information about the richfaces-svn-commits
mailing list