掲示板
how to get aui-calender selected date value?
12年前 に srikanth davuluri によって更新されました。
how to get aui-calender selected date value?
Junior Member 投稿: 25 参加年月日: 11/06/07 最新の投稿
Hi All....
could you please provide code to get selected date in input text box using aui-calender
Thanks in Advance..
Regards
Srikanth Davuluri.
could you please provide code to get selected date in input text box using aui-calender
Thanks in Advance..
Regards
Srikanth Davuluri.
12年前 に Juhi Kumari によって更新されました。
RE: how to get aui-calender selected date value?
Expert 投稿: 347 参加年月日: 11/12/12 最新の投稿
Hi
Use this code to get selected date in input text box using aui-calender.
startDate is the id of that text box where you want the selected date.
Regards
Juhi
Use this code to get selected date in input text box using aui-calender.
<aui:script>
var startCal;
var endCal;
AUI().ready('aui-calendar', function(A) {
startCal = new A.Calendar({
trigger : '#<portlet:namespace />startDate',
dateFormat : '%d/%m/%Y',
selectMultipleDates : false,
on : {
select : function(event) {
endCal.set('minDate', startCal.getCurrentDate());
endCal.syncUI();
}
}
}).render();
A.on('mousedown', function() {
A.CalendarManager.hideAll();
}, document);
});
</aui:script>
startDate is the id of that text box where you want the selected date.
Regards
Juhi
12年前 に srikanth davuluri によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 25 参加年月日: 11/06/07 最新の投稿
Hi Juhi Kumari,
i tried with above code but it is displaying only text box could you please explain clearly with sample jsp page.
i tried with above code but it is displaying only text box could you please explain clearly with sample jsp page.
12年前 に Juhi Kumari によって更新されました。
RE: how to get aui-calender selected date value?
Expert 投稿: 347 参加年月日: 11/12/12 最新の投稿
Hi srikanth
Use this aui taglib in your jsp and make a text box with name 'startDate'. When you click in that text box that time this calendar should trigger.
Remove these lines
var endCal;
endCal.set('minDate', startCal.getCurrentDate());
endCal.syncUI();
Please let me know if you have any problem.
Regards
Juhi
Use this aui taglib in your jsp and make a text box with name 'startDate'. When you click in that text box that time this calendar should trigger.
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
Remove these lines
var endCal;
endCal.set('minDate', startCal.getCurrentDate());
endCal.syncUI();
Please let me know if you have any problem.
Regards
Juhi
12年前 に srikanth davuluri によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 25 参加年月日: 11/06/07 最新の投稿
Hi
still facing same problem calender picker is displaying in header and text filed displaying in body.
please provide complete jsp page so that i will implement.
still facing same problem calender picker is displaying in header and text filed displaying in body.
please provide complete jsp page so that i will implement.
12年前 に Bavithra Rajendran によって更新されました。
RE: how to get aui-calender selected date value?
Regular Member 投稿: 123 参加年月日: 09/10/08 最新の投稿
Hi,
You can try this
Thanks,
Bavithra Rajendran
You can try this
<input type="text" size="50" id="myDatepicker">
<script type="text/javascript" charset="utf-8">
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#myDatepicker',
dateFormat: '%d/%m/%y %A',
setValue: true,
minDate: '01/01/2000',
maxDate: '09/05/2020',
selectMultipleDates: false
})
.render();
});
</script>
Thanks,
Bavithra Rajendran
12年前 に srikanth davuluri によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 25 参加年月日: 11/06/07 最新の投稿
Hi Bavithra Rajendran
thanks for your response it is working fine but i am unable to set minDate and maxDate in calender could you please provide solution.
thanks for your response it is working fine but i am unable to set minDate and maxDate in calender could you please provide solution.
12年前 に Bavithra Rajendran によって更新されました。
RE: how to get aui-calender selected date value? (回答)
Regular Member 投稿: 123 参加年月日: 09/10/08 最新の投稿
Add the attributes inside calendar: {}. It will work. The code should be like this
Thanks,
Bavithra Rajendran
<input type="text" size="50" id="myDatepicker">
<script type="text/javascript" charset="utf-8">
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#myDatepicker',
calendar: {
dateFormat: '%d/%m/%y %A',
setValue: true,
minDate: '01/01/2011',
maxDate: '09/05/2012',
selectMultipleDates: false
}
})
.render();
});
</script>
Thanks,
Bavithra Rajendran
12年前 に Srikanth Davuluri によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 25 参加年月日: 11/06/07 最新の投稿
Thanks for your response
it is working fine...
it is working fine...
12年前 に RathnaDevi Chellaiah によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 29 参加年月日: 12/03/27 最新の投稿
Hi Bavithra Rajendran,
The code which u posted was very useful for me .. i was breaking my head for whole day to use calendar with a simple code.. thanks a lot
The code which u posted was very useful for me .. i was breaking my head for whole day to use calendar with a simple code.. thanks a lot
12年前 に ruchi sharma によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 95 参加年月日: 11/03/24 最新の投稿
Hello friends,
I also want to do the same stuff...
I have tried to use the same code given by Bavithra, but i am just getting the text field and when i click on it nothing happen.
Why i am not getting the calender??
Is their any wrong syntax??
Below is my jsp :
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<div>
<input type="text" size="50" id="myDatepicker" />
</div>
<script type="text/javascript" charset="utf-8">
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#myDatepicker',
calendar: {
dateFormat: '%d/%m/%y %A',
setValue: true,
minDate: '01/01/2011',
maxDate: '09/05/2012',
selectMultipleDates: false
}
}).render();
});
</script>
Any help would be appreciated.
Thanks
Ruchi
I also want to do the same stuff...
I have tried to use the same code given by Bavithra, but i am just getting the text field and when i click on it nothing happen.
Why i am not getting the calender??
Is their any wrong syntax??
Below is my jsp :
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<div>
<input type="text" size="50" id="myDatepicker" />
</div>
<script type="text/javascript" charset="utf-8">
AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger: '#myDatepicker',
calendar: {
dateFormat: '%d/%m/%y %A',
setValue: true,
minDate: '01/01/2011',
maxDate: '09/05/2012',
selectMultipleDates: false
}
}).render();
});
</script>
Any help would be appreciated.
Thanks
Ruchi
12年前 に Srikanth Davuluri によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 25 参加年月日: 11/06/07 最新の投稿
Hi Ruchi,
nothing wrong in your code i executed. it is working fine in my system whats happening in your machine i don't know. Try to execute it in sample / test portlet then you can find mistake.
Thanks
Srikanth Davuluri
nothing wrong in your code i executed. it is working fine in my system whats happening in your machine i don't know. Try to execute it in sample / test portlet then you can find mistake.
Thanks
Srikanth Davuluri
12年前 に ruchi sharma によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 95 参加年月日: 11/03/24 最新の投稿
Thanks Srikanth,
Still surprised its not working .
I have had tried with test portlet individuality, sill is not working.
Then I used jquery for datepicker
Script Code :
<script type="text/javascript">
jQuery(document).ready(function() {
console.log("hello1");
jQuery("#startdatepicker").datepicker();
});
</script>
Code :
This following single line of code is to be added
<p>Start Date: <input type="text" id="startdatepicker"></p>
its working in my test portlet but not working where i want to do (i want to call this in my configuration.jsp(which is a popup) of my portlet).
Is anybody think of anything else.
thanks
Ruchi
Still surprised its not working .
I have had tried with test portlet individuality, sill is not working.
Then I used jquery for datepicker
Script Code :
<script type="text/javascript">
jQuery(document).ready(function() {
console.log("hello1");
jQuery("#startdatepicker").datepicker();
});
</script>
Code :
This following single line of code is to be added
<p>Start Date: <input type="text" id="startdatepicker"></p>
its working in my test portlet but not working where i want to do (i want to call this in my configuration.jsp(which is a popup) of my portlet).
Is anybody think of anything else.
thanks
Ruchi
11年前 に Sanket Gosavi によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 35 参加年月日: 11/12/24 最新の投稿
What if i want to show calendar on front for selecting date....i want user to click on calender directly and select date...not on textbox...Any help plz
9年前 に mohammad azaruddin によって更新されました。
RE: how to get aui-calender selected date value?
Expert 投稿: 492 参加年月日: 12/09/17 最新の投稿
Hi ruchi
did you resolve this issue
It seems the above code will not work for LR6.2
did you resolve this issue
It seems the above code will not work for LR6.2
9年前 に vinod kumar によって更新されました。
RE: how to get aui-calender selected date value?
Junior Member 投稿: 64 参加年月日: 12/10/04 最新の投稿
Hi Mohammad,
i am facing the same problem have you resolved the date picker in LR6.2.
i am facing the same problem have you resolved the date picker in LR6.2.
9年前 に Kyle Joseph Stiemann によって更新されました。
RE: how to get aui-calender selected date value?
Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
Hi Guys,
In order to do this in Liferay Portal 6.2, you need to use the AlloyUI 2.0 Datepicker.
The code would look something like this:
- Kyle
In order to do this in Liferay Portal 6.2, you need to use the AlloyUI 2.0 Datepicker.
The code would look something like this:
<div>
<input type="text" id="myDatepicker">
</div>
<script type="text/javascript">
AUI().use('aui-datepicker', function(A) {
new A.DatePicker({
trigger: '#myDatepicker',
popover: { zIndex: 99999 },
mask: '%d/%m/%y %A',
calendar: {
minimumDate: new Date(2011,00,01),
maximumDate: new Date(2012,08,05),
selectionMode: 'multiple'
}
}).render();
});
</script>
- Kyle
9年前 に mohammad azaruddin によって更新されました。
RE: how to get aui-calender selected date value?
Expert 投稿: 492 参加年月日: 12/09/17 最新の投稿
Thanks Kyle Joseph Stiemann
The above code will work fine But Do you have any solution for the same in portlet-model-hints.xml when we use <aui:model-context bean="" model="" />.
where as <hint name="year-range-past">false</hint> doesn't seems to work in UI level
The above code will work fine But Do you have any solution for the same in portlet-model-hints.xml when we use <aui:model-context bean="" model="" />.
where as <hint name="year-range-past">false</hint> doesn't seems to work in UI level
9年前 に Kyle Joseph Stiemann によって更新されました。
RE: how to get aui-calender selected date value?
Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
Hi Mohammad,
I'm glad the code is working for you. You should post this question in a new thread since it is a new topic.
- Kyle
I'm glad the code is working for you. You should post this question in a new thread since it is a new topic.
- Kyle
9年前 に mohammad azaruddin によって更新されました。
RE: how to get aui-calender selected date value?
Expert 投稿: 492 参加年月日: 12/09/17 最新の投稿
Yeah you are right
11年前 に Mazhar Alam によって更新されました。
RE: how to get aui-calender selected date value?
Regular Member 投稿: 191 参加年月日: 11/11/25 最新の投稿
Helpful post Bavithra!!