Here we can show how you can add the calendar control in your Alloy UI form. The below example explains how you can put your calendar control on textarea in your Alloy UI form.
Example:
<script>
YUI().use(
'aui-datepicker',
function(Y) {
new Y.DatePicker(
{
trigger: 'textarea',
mask: '%d/%m/%y',
calendar: {
selectionMode: 'multiple'
},
popover: {
zIndex: 1
},
}
);
}
);
</script>
<%@include file="include.jsp" %>
<%@page import="javax.portlet.PortletURL" %>
<%@page import="javax.portlet.ActionRequest" %>
<portlet:actionURL name="loginCheck" var="loginURL" >
</portlet:actionURL>
<aui:form name="loginCheck" method="POST" action="<%=loginURL.toString() %>">
<aui:input type="text" label="PermitNo:" name="pid" />
<textarea type="text" size="10" placeholder="dd/mm/yy"></textarea>
<aui:button type="submit" value="addDetails" />
</aui:form>
Hope this will help you :)
0 Comment(s)