Posts

Showing posts with the label datepicker

Date Picker in liferay

Image
In Liferay it is simple to add the add the DatePicker. Liferay already had datepicker taglib, so here we go . Creating the calendar object, for today date. Calendar cal = CalendarFactoryUtil.getCalendar(timeZone, locale); int startDateValue = cal.get(Calendar.DATE); int startMonthValue = cal.get(Calendar.MONTH); int startYearValue = cal.get(Calendar.YEAR); Implementing the date picker, <aui:fieldset> <aui:field-wrapper label="start-date"> </aui:field-wrapper></aui:fieldset> <div class="field-row"> <liferay-ui:input-date dayparam="schedulerStartDateDay" dayvalue="&lt;%=startDateValue %&gt;" disabled="&lt;%= false %&gt;" monthparam="schedulerStartDateMonth" monthvalue="&lt;%=startMonthValue%&gt;" name="startDate" yearparam="schedulerStartDateYear" yearvalue="&lt;%=startYearValue%&gt;"> </liferay-u...