Fórum
how to get aui-calender selected date value?
srikanth davuluri, modificado 12 Anos atrás.
how to get aui-calender selected date value?
Junior Member Postagens: 25 Data de Entrada: 07/06/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Expert Postagens: 347 Data de Entrada: 12/12/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 25 Data de Entrada: 07/06/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Expert Postagens: 347 Data de Entrada: 12/12/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 25 Data de Entrada: 07/06/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Regular Member Postagens: 123 Data de Entrada: 08/10/09 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 25 Data de Entrada: 07/06/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value? (Resposta)
Regular Member Postagens: 123 Data de Entrada: 08/10/09 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 25 Data de Entrada: 07/06/11 Postagens Recentes
Thanks for your response
it is working fine...
it is working fine...
RathnaDevi Chellaiah, modificado 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 29 Data de Entrada: 27/03/12 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 95 Data de Entrada: 24/03/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 25 Data de Entrada: 07/06/11 Postagens Recentes
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 12 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 95 Data de Entrada: 24/03/11 Postagens Recentes
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 11 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 35 Data de Entrada: 24/12/11 Postagens Recentes
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 9 Anos atrás.
RE: how to get aui-calender selected date value?
Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
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 9 Anos atrás.
RE: how to get aui-calender selected date value?
Junior Member Postagens: 64 Data de Entrada: 04/10/12 Postagens Recentes
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 9 Anos atrás.
RE: how to get aui-calender selected date value?
Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
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 9 Anos atrás.
RE: how to get aui-calender selected date value?
Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
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 9 Anos atrás.
RE: how to get aui-calender selected date value?
Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
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 9 Anos atrás.
RE: how to get aui-calender selected date value?
Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
Yeah you are right
Mazhar Alam, modificado 11 Anos atrás.
RE: how to get aui-calender selected date value?
Regular Member Postagens: 191 Data de Entrada: 25/11/11 Postagens Recentes
Helpful post Bavithra!!