Foren
how to get aui-calender selected date value?
srikanth davuluri, geändert vor 12 Jahren.
how to get aui-calender selected date value?
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
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.
Juhi Kumari, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
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
srikanth davuluri, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
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.
Juhi Kumari, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
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
srikanth davuluri, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
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.
Bavithra Rajendran, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Regular Member Beiträge: 123 Beitrittsdatum: 08.10.09 Neueste Beiträge
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
srikanth davuluri, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
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.
Bavithra Rajendran, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value? (Antwort)
Regular Member Beiträge: 123 Beitrittsdatum: 08.10.09 Neueste Beiträge
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
Srikanth Davuluri, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
Thanks for your response
it is working fine...
it is working fine...
RathnaDevi Chellaiah, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 29 Beitrittsdatum: 27.03.12 Neueste Beiträge
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
ruchi sharma, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 95 Beitrittsdatum: 24.03.11 Neueste Beiträge
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
Srikanth Davuluri, geändert vor 12 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
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
ruchi sharma, geändert vor 11 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 95 Beitrittsdatum: 24.03.11 Neueste Beiträge
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
Sanket Gosavi, geändert vor 11 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 35 Beitrittsdatum: 24.12.11 Neueste Beiträge
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
mohammad azaruddin, geändert vor 9 Jahren.
RE: how to get aui-calender selected date value?
Expert Beiträge: 492 Beitrittsdatum: 17.09.12 Neueste Beiträge
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
vinod kumar, geändert vor 9 Jahren.
RE: how to get aui-calender selected date value?
Junior Member Beiträge: 64 Beitrittsdatum: 04.10.12 Neueste Beiträge
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.
Kyle Joseph Stiemann, geändert vor 9 Jahren.
RE: how to get aui-calender selected date value?
Liferay Master Beiträge: 760 Beitrittsdatum: 14.01.13 Neueste Beiträge
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
mohammad azaruddin, geändert vor 9 Jahren.
RE: how to get aui-calender selected date value?
Expert Beiträge: 492 Beitrittsdatum: 17.09.12 Neueste Beiträge
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
Kyle Joseph Stiemann, geändert vor 9 Jahren.
RE: how to get aui-calender selected date value?
Liferay Master Beiträge: 760 Beitrittsdatum: 14.01.13 Neueste Beiträge
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
mohammad azaruddin, geändert vor 9 Jahren.
RE: how to get aui-calender selected date value?
Expert Beiträge: 492 Beitrittsdatum: 17.09.12 Neueste Beiträge
Yeah you are right
Mazhar Alam, geändert vor 11 Jahren.
RE: how to get aui-calender selected date value?
Regular Member Beiträge: 191 Beitrittsdatum: 25.11.11 Neueste Beiträge
Helpful post Bavithra!!