Foros de discusión
how to get aui-calender selected date value?
srikanth davuluri, modificado hace 12 años.
how to get aui-calender selected date value?
Junior Member Mensajes: 25 Fecha de incorporación: 7/06/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 25 Fecha de incorporación: 7/06/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 25 Fecha de incorporación: 7/06/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Regular Member Mensajes: 123 Fecha de incorporación: 8/10/09 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 25 Fecha de incorporación: 7/06/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value? (Respuesta)
Regular Member Mensajes: 123 Fecha de incorporación: 8/10/09 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 25 Fecha de incorporación: 7/06/11 Mensajes recientes
Thanks for your response
it is working fine...
it is working fine...
RathnaDevi Chellaiah, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 29 Fecha de incorporación: 27/03/12 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 95 Fecha de incorporación: 24/03/11 Mensajes recientes
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, modificado hace 12 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 25 Fecha de incorporación: 7/06/11 Mensajes recientes
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, modificado hace 11 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 95 Fecha de incorporación: 24/03/11 Mensajes recientes
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, modificado hace 11 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 35 Fecha de incorporación: 24/12/11 Mensajes recientes
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, modificado hace 9 años.
RE: how to get aui-calender selected date value?
Expert Mensajes: 492 Fecha de incorporación: 17/09/12 Mensajes recientes
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, modificado hace 9 años.
RE: how to get aui-calender selected date value?
Junior Member Mensajes: 64 Fecha de incorporación: 4/10/12 Mensajes recientes
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, modificado hace 9 años.
RE: how to get aui-calender selected date value?
Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
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, modificado hace 9 años.
RE: how to get aui-calender selected date value?
Expert Mensajes: 492 Fecha de incorporación: 17/09/12 Mensajes recientes
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, modificado hace 9 años.
RE: how to get aui-calender selected date value?
Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
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, modificado hace 9 años.
RE: how to get aui-calender selected date value?
Expert Mensajes: 492 Fecha de incorporación: 17/09/12 Mensajes recientes
Yeah you are right
Mazhar Alam, modificado hace 11 años.
RE: how to get aui-calender selected date value?
Regular Member Mensajes: 191 Fecha de incorporación: 25/11/11 Mensajes recientes
Helpful post Bavithra!!