掲示板
How to show the text box as null with aui datepicker in liferay 6.1
11年前 に Kiran Kumar Boyini によって更新されました。
How to show the text box as null with aui datepicker in liferay 6.1
Expert 投稿: 287 参加年月日: 11/06/02 最新の投稿
Hi All,
I am using the aui date picker for aui: input .It is working fine.But I do nt want to show nothing in input field before user selection,
but it is showing today date defaultly.
See the code below:
Regards,
Kiran.
I am using the aui date picker for aui: input .It is working fine.But I do nt want to show nothing in input field before user selection,
but it is showing today date defaultly.
See the code below:
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#<portlet:namespace />fromDate',
calendar: {
dateFormat: '%d-%m-%Y'}
}).render('##<portlet:namespace />/>fromDate');
Regards,
Kiran.
11年前 に Aldi Tirane によって更新されました。
RE: How to show the text box as null with aui datepicker in liferay 6.1
Junior Member 投稿: 25 参加年月日: 12/10/23 最新の投稿
Hello to everyone.
Does any one have a solution for this issue?
Thanks.
Does any one have a solution for this issue?
Thanks.
11年前 に Murali Karteek によって更新されました。
RE: How to show the text box as null with aui datepicker in liferay 6.1
Junior Member 投稿: 37 参加年月日: 12/03/05 最新の投稿
Hi kiran Kumar Bovini & ALdi Tirane,
Use < Liferay-ui-date ......../> tag so that you can have null values
Thanks & regards,
Karteek
Use < Liferay-ui-date ......../> tag so that you can have null values
<liferay-ui:input-date monthParam="endDateMonth" monthValue="<%= -1 %>" dayParam="endtDateDay" dayValue="<%= 0 %>" yearParam="endDateYear" yearValue="<%=0 %>" yearRangeStart="<%= today.get(Calendar.YEAR) - 5 %>" yearRangeEnd="<%= today.get(Calendar.YEAR) + 5 %>" firstDayOfWeek="<%= today.getFirstDayOfWeek() - 1 %>" dayNullable="<%= true %>" monthNullable="<%= true %>" yearNullable="<%= true %>" disabled="<%= false %>" />
Thanks & regards,
Karteek
11年前 に Aldi Tirane によって更新されました。
RE: How to show the text box as null with aui datepicker in liferay 6.1
Junior Member 投稿: 25 参加年月日: 12/10/23 最新の投稿
My solution. I added the row:
after initialize the calendar form. So now the code look like:
document.<portlet:namespace />fm.<portlet:namespace />startDate.value = "";
after initialize the calendar form. So now the code look like:
<span class="aui-datepicker" id="#<portlet:namespace />startDatePicker">
<input type="text" name="<%=NjoftimePerKreditoretDisplayTerms.BEGIN_DATE_SEARCH %>" id="<portlet:namespace />startDate" size="62" value="<%=" none"%>"/>
</span>
<aui:script>
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#<portlet:namespace />startDate',
}).render('##<portlet:namespace />startDatePicker');
document.<portlet:namespace />fm.<portlet:namespace />startDate.value = "";
});
</aui:script>
11年前 に Tejas patel によって更新されました。
RE: How to show the text box as null with aui datepicker in liferay 6.1
Junior Member 投稿: 71 参加年月日: 12/01/24 最新の投稿
Hi kiran,
you can use as below so it display no value in text field.
you can use as below so it display no value in text field.
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#<portlet:namespace />fromDate',
calendar: {
dateFormat: '%d-%m-%Y'}
}).render('##<portlet:namespace />/>fromDate');
A.one('#<portlet:namespace />fromDate').val('');
10年前 に nicola Baiocco によって更新されました。
RE: How to show the text box as null with aui datepicker in liferay 6.1
New Member 投稿: 5 参加年月日: 13/11/27 最新の投稿
Another way could be:
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#<portlet:namespace />fromDate',
calendar: {
dateFormat: '%d-%m-%Y'
}
}).render('##<portlet:namespace />/>fromDate');
//clear input val
A.one('#<portlet:namespace />fromDate').val('');
//clear calendar from default value
simpleDatepicker1.calendar.clear();