Fórum
LIferay, AUI datepicker is not working
Chandan Sharma, modificado 9 Anos atrás.
LIferay, AUI datepicker is not working
Junior Member Postagens: 54 Data de Entrada: 04/03/14 Postagens Recentes
Hi Experts,
I am trying to use Liferay/AUI datepicker in my portlet. It is coming perfectly when I am accessing the jsp as popup, but while accessing directly inside my "view.jsp" then it is coming but not allowing me to perform any action like selecting the date.
Based on my observation it is going behind my theme. So because of that even if it is rendering but not allowing me to select.
Here is my sample code for date-picker
Note: I had tried to put some z-index but still, I didn't succeeded to fulfill my requirement.
Can any body will help me!!!
Thanks,
~Chandan
I am trying to use Liferay/AUI datepicker in my portlet. It is coming perfectly when I am accessing the jsp as popup, but while accessing directly inside my "view.jsp" then it is coming but not allowing me to perform any action like selecting the date.
Based on my observation it is going behind my theme. So because of that even if it is rendering but not allowing me to select.
Here is my sample code for date-picker
<aui:input name="taskStartDate" autocomplete="off" cssClass="font-size" value="<%=est_start_date%>" id="taskStartDate" onblur="validateDate(this, 'estStartDateMsg')" required="true" inlineLabel="true" label=" " onClick="onClickOfStartDate();" onkeypress="return isDateKey(event);" />
<aui:script>
function setactualStartDate(){
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#<portlet:namespace />taskActualStartDate',
mask: '%Y-%m-%d',
calendar: {
dateFormat: '%Y-%m-%d',
},
}).render('##<portlet:namespace />taskactualStartDatePicker');
});
}
function onClickOfStartDate(){
setStartDate();
}
</aui:script>
Note: I had tried to put some z-index but still, I didn't succeeded to fulfill my requirement.
Can any body will help me!!!
Thanks,
~Chandan
Vilmos Papp, modificado 9 Anos atrás.
RE: LIferay, AUI datepicker is not working
Liferay Master Postagens: 529 Data de Entrada: 21/10/10 Postagens Recentes
I think perhaps you should put the method in a Liferay.provide() something like this:
Please note, that <aui:script> shouldn't have a use='' argument, ortherwise it won't behave as a normal <script> tag, but will do lazy loading of the plugins.
<aui:script>
Liferay.provide(
window,
'<portlet:namespace />saveConfiguration',
function() {
if (document.<portlet:namespace />fm.<portlet:namespace />assetVocabularyIds) {
document.<portlet:namespace />fm.<portlet:namespace />assetVocabularyIds.value = Liferay.Util.listSelect(document.<portlet:namespace />fm.<portlet:namespace />currentAssetVocabularyIds);
}
submitForm(document.<portlet:namespace />fm);
},
['liferay-util-list-fields']
);
</aui:script>
Please note, that <aui:script> shouldn't have a use='' argument, ortherwise it won't behave as a normal <script> tag, but will do lazy loading of the plugins.