Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to add Calendar control to Alloy UI form in Liferay

    • 0
    • 2
    • 1
    • 3
    • 0
    • 0
    • 0
    • 0
    • 1.22k
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: