06 November, 2012

Date picker using alloy UI

Use below code to insert date picker in your jsp file :
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>


This is Calendar using Alloy UI.

<%@ taglib prefix="aui" uri="http://liferay.com/tld/aui" %>

Start Date:

AUI().use('aui-datepicker', function(A) { var simpleDatepicker1 = new A.DatePicker({ trigger: '#startDate', }).render('##startDatePicker'); });

Start Date: from HTML Markup

AUI().use('aui-datepicker', function(A) { var datepicker2 = new A.DatePickerSelect({ srcNode: '#srcNode', contentBox: '#srcNode', boundingBox: '#datePickerBB', appendOrder: [ 'y', 'm', 'd' ], calendar: { dates: [ '10/10/2010' ], dateFormat: '%m/%d/%y' }, // dayNode: '#dayNode', // monthNode: '#monthNode', // yearNode: '#yearNode', // dayNodeName: 'dayNode', // monthNodeName: 'monthNode', // yearNodeName: 'yearNode', nullableDay: true, nullableMonth: true, nullableYear: true, // populateMonth: false, // populateDay: false, // populateYear: false, yearRange: [ 1980, (new Date).getFullYear() ] }).render(); });

Rate Me:

1 Discussion:

Parth Ghiya said...

Nice one :)

Why not to use this but




???