Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Javascript and Alloy UI calendars
Hi,
I'm new to Liferay, and I'm having troubles with the Calendar tag. I've defined two calendar objects in Liferay, and I'd like to update the dates when someone selects a link. The code below is what I'm using:
In the above example next to the calendar controls, I have links for Last 7 Days, Month to Date, etc. When someone clicks "Last 7 Days", I'd like to update the dates in the controls. I can update each rendered control by it's name for the day, month and year, but it seems that there has to be an easier way.
Thanks,
DJ Spiess
I'm new to Liferay, and I'm having troubles with the Calendar tag. I've defined two calendar objects in Liferay, and I'd like to update the dates when someone selects a link. The code below is what I'm using:
<aui:column>
<aui:input name="startDate" model="<%= MappingPortletBean.class %>" bean="<%=userSelections %>" value="<%= startCal %>" />
<aui:input name="endDate" model="<%= MappingPortletBean.class %>" bean="<%=userSelections %>" value="<%= endCal %>" />
<a href="<%= "javascript:" + renderResponse.getNamespace() + "_updateLast7Days();" %>">Last 7 days</a>
| <a href="<%= "javascript:" + renderResponse.getNamespace() + "_updateMonthToDate();" %>">Month to date</a>
| <a href="<%= "javascript:" + renderResponse.getNamespace() + "_updateYearToDate();" %>">Year to date</a>
| <a href="<%= "javascript:" + renderResponse.getNamespace() + "_updatePreviousMonth();" %>">Previous Month</a>
</aui:column>
In the above example next to the calendar controls, I have links for Last 7 Days, Month to Date, etc. When someone clicks "Last 7 Days", I'd like to update the dates in the controls. I can update each rendered control by it's name for the day, month and year, but it seems that there has to be an easier way.
Thanks,
DJ Spiess