Skip to content

Commit

Permalink
SAK-2654 - Add selected day's date as default date for new events in …
Browse files Browse the repository at this point in the history
…Calendar (sakaiproject#6033)
  • Loading branch information
danielmerino authored and ern committed Sep 25, 2018
1 parent 41f1bb2 commit 548fbb6
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3851,6 +3851,16 @@ protected void buildNewContext(VelocityPortlet portlet,

String peid = ((JetspeedRunData)runData).getJs_peid();
SessionState sstate = ((JetspeedRunData)runData).getPortletSessionState(peid);

if ((sstate.getAttribute(STATE_YEAR) != null) && (sstate.getAttribute(STATE_MONTH) != null) && (sstate.getAttribute(STATE_DAY) != null))
{
int stateYear = ((Integer)sstate.getAttribute(STATE_YEAR)).intValue();
int stateMonth = ((Integer)sstate.getAttribute(STATE_MONTH)).intValue();
int stateDay = ((Integer)sstate.getAttribute(STATE_DAY)).intValue();

calObj.setDay(stateYear, stateMonth, stateDay);
dateObj1.setTodayDate(calObj.getMonthInteger(),calObj.getDayOfMonth(),calObj.getYear());
}

String scheduleTo = (String)sstate.getAttribute(STATE_SCHEDULE_TO);
if (scheduleTo != null && scheduleTo.length() != 0)
Expand Down

0 comments on commit 548fbb6

Please sign in to comment.