Fóruns

Início » Alloy UI » English

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
how to get aui-calender selected date value? Srikanth Davuluri 2 de Janeiro de 2012 21:02
RE: how to get aui-calender selected date value? Juhi Kumari 2 de Janeiro de 2012 21:25
RE: how to get aui-calender selected date value? Srikanth Davuluri 2 de Janeiro de 2012 21:40
RE: how to get aui-calender selected date value? Juhi Kumari 2 de Janeiro de 2012 22:10
RE: how to get aui-calender selected date value? Srikanth Davuluri 2 de Janeiro de 2012 22:24
RE: how to get aui-calender selected date value? Bavithra Rajendran 2 de Janeiro de 2012 23:40
RE: how to get aui-calender selected date value? Srikanth Davuluri 2 de Janeiro de 2012 23:13
RE: how to get aui-calender selected date value? Bavithra Rajendran 3 de Janeiro de 2012 01:02
RE: how to get aui-calender selected date value? Srikanth Davuluri 3 de Janeiro de 2012 03:09
RE: how to get aui-calender selected date value? RathnaDevi Chellaiah 26 de Março de 2012 22:30
RE: how to get aui-calender selected date value? ruchi sharma 18 de Abril de 2012 07:52
RE: how to get aui-calender selected date value? Srikanth Davuluri 18 de Abril de 2012 21:15
RE: how to get aui-calender selected date value? ruchi sharma 23 de Abril de 2012 08:28
RE: how to get aui-calender selected date value? Sanket Gosavi 9 de Maio de 2012 08:59
RE: how to get aui-calender selected date value? Mohammad Azharuddin 8 de Junho de 2014 07:54
RE: how to get aui-calender selected date value? kumar E 22 de Junho de 2014 23:25
RE: how to get aui-calender selected date value? Kyle Joseph Stiemann 11 de Julho de 2014 12:36
RE: how to get aui-calender selected date value? Mohammad Azharuddin 14 de Julho de 2014 23:23
RE: how to get aui-calender selected date value? Kyle Joseph Stiemann 15 de Julho de 2014 06:52
RE: how to get aui-calender selected date value? Mohammad Azharuddin 15 de Julho de 2014 21:16
RE: how to get aui-calender selected date value? Mazhar Alam 7 de Novembro de 2012 02:08
Srikanth Davuluri
how to get aui-calender selected date value?
2 de Janeiro de 2012 21:02
Resposta

Srikanth Davuluri

Ranking: Junior Member

Mensagens: 25

Data de entrada: 7 de Junho de 2011

Mensagens 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.
Juhi Kumari
RE: how to get aui-calender selected date value?
2 de Janeiro de 2012 21:25
Resposta

Juhi Kumari

Ranking: Expert

Mensagens: 347

Data de entrada: 12 de Dezembro de 2011

Mensagens recentes

Hi

Use this code to get selected date in input text box using aui-calender.
 1
 2<aui:script>
 3    var startCal;
 4    var endCal;
 5    AUI().ready('aui-calendar', function(A) {
 6        startCal = new A.Calendar({
 7            trigger : '#<portlet:namespace />startDate',
 8            dateFormat : '%d/%m/%Y',
 9            
10            selectMultipleDates : false,
11            on : {
12                select : function(event) {
13                    endCal.set('minDate', startCal.getCurrentDate());
14                    endCal.syncUI();
15                }
16            }
17        }).render();
18
19        A.on('mousedown', function() {
20            A.CalendarManager.hideAll();
21        }, document);
22
23    });
24</aui:script>


startDate is the id of that text box where you want the selected date.


Regards
Juhi
Srikanth Davuluri
RE: how to get aui-calender selected date value?
2 de Janeiro de 2012 21:40
Resposta

Srikanth Davuluri

Ranking: Junior Member

Mensagens: 25

Data de entrada: 7 de Junho de 2011

Mensagens 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.
Juhi Kumari
RE: how to get aui-calender selected date value?
2 de Janeiro de 2012 22:10
Resposta

Juhi Kumari

Ranking: Expert

Mensagens: 347

Data de entrada: 12 de Dezembro de 2011

Mensagens 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.
1<%@ 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
RE: how to get aui-calender selected date value?
2 de Janeiro de 2012 22:24
Resposta

Srikanth Davuluri

Ranking: Junior Member

Mensagens: 25

Data de entrada: 7 de Junho de 2011

Mensagens 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.
Bavithra Rajendran
RE: how to get aui-calender selected date value?
2 de Janeiro de 2012 23:40
Resposta

Bavithra Rajendran

LIFERAY STAFF

Ranking: Regular Member

Mensagens: 123

Data de entrada: 7 de Outubro de 2009

Mensagens recentes

Hi,

You can try this
 1<input type="text" size="50" id="myDatepicker" />
 2
 3<script type="text/javascript" charset="utf-8">
 4AUI().use('aui-datepicker', function(A) {
 5    var simpleDatepicker1 = new A.DatePicker({
 6        trigger: '#myDatepicker',
 7        dateFormat: '%d/%m/%y %A',
 8        setValue: true,
 9        minDate: '01/01/2000',
10        maxDate: '09/05/2020',
11        selectMultipleDates: false
12    })
13    .render();
14});
15</script>


Thanks,
Bavithra Rajendran
Srikanth Davuluri
RE: how to get aui-calender selected date value?
2 de Janeiro de 2012 23:13
Resposta

Srikanth Davuluri

Ranking: Junior Member

Mensagens: 25

Data de entrada: 7 de Junho de 2011

Mensagens 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.
Bavithra Rajendran
RE: how to get aui-calender selected date value?
3 de Janeiro de 2012 01:02
Resposta

Bavithra Rajendran

LIFERAY STAFF

Ranking: Regular Member

Mensagens: 123

Data de entrada: 7 de Outubro de 2009

Mensagens recentes

Add the attributes inside calendar: {}. It will work. The code should be like this
 1
 2<input type="text" size="50" id="myDatepicker" />
 3
 4<script type="text/javascript" charset="utf-8">
 5AUI().use('aui-datepicker', function(A) {
 6    var simpleDatepicker1 = new A.DatePicker({
 7        trigger: '#myDatepicker',
 8        calendar: {
 9        dateFormat: '%d/%m/%y %A',
10        setValue: true,
11        minDate: '01/01/2011',
12        maxDate: '09/05/2012',
13        selectMultipleDates: false
14        }
15    })
16    .render();
17});
18</script>


Thanks,
Bavithra Rajendran
Srikanth Davuluri
RE: how to get aui-calender selected date value?
3 de Janeiro de 2012 03:09
Resposta

Srikanth Davuluri

Ranking: Junior Member

Mensagens: 25

Data de entrada: 7 de Junho de 2011

Mensagens recentes

Thanks for your response

it is working fine...
RathnaDevi Chellaiah
RE: how to get aui-calender selected date value?
26 de Março de 2012 22:30
Resposta

RathnaDevi Chellaiah

Ranking: Junior Member

Mensagens: 29

Data de entrada: 26 de Março de 2012

Mensagens recentes

Hi Bavithra Rajendran,
The code which u posted was very useful for me ..emoticon i was breaking my head for whole day to use calendar with a simple code.. thanks a lotemoticon
ruchi sharma
RE: how to get aui-calender selected date value?
18 de Abril de 2012 07:52
Resposta

ruchi sharma

Ranking: Junior Member

Mensagens: 95

Data de entrada: 24 de Março de 2011

Mensagens 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
Srikanth Davuluri
RE: how to get aui-calender selected date value?
18 de Abril de 2012 21:15
Resposta

Srikanth Davuluri

Ranking: Junior Member

Mensagens: 25

Data de entrada: 7 de Junho de 2011

Mensagens 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
ruchi sharma
RE: how to get aui-calender selected date value?
23 de Abril de 2012 08:28
Resposta

ruchi sharma

Ranking: Junior Member

Mensagens: 95

Data de entrada: 24 de Março de 2011

Mensagens 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
Sanket Gosavi
RE: how to get aui-calender selected date value?
9 de Maio de 2012 08:59
Resposta

Sanket Gosavi

Ranking: Junior Member

Mensagens: 35

Data de entrada: 24 de Dezembro de 2011

Mensagens 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
Mazhar Alam
RE: how to get aui-calender selected date value?
7 de Novembro de 2012 02:08
Resposta

Mazhar Alam

Ranking: Regular Member

Mensagens: 201

Data de entrada: 25 de Novembro de 2011

Mensagens recentes

Helpful post Bavithra!!
Mohammad Azharuddin
RE: how to get aui-calender selected date value?
8 de Junho de 2014 07:54
Resposta

Mohammad Azharuddin

Ranking: Expert

Mensagens: 457

Data de entrada: 17 de Setembro de 2012

Mensagens recentes

Hi ruchi
did you resolve this issue
It seems the above code will not work for LR6.2
kumar E
RE: how to get aui-calender selected date value?
22 de Junho de 2014 23:25
Resposta

kumar E

Ranking: Junior Member

Mensagens: 64

Data de entrada: 3 de Outubro de 2012

Mensagens recentes

Hi Mohammad,

i am facing the same problem have you resolved the date picker in LR6.2.
Kyle Joseph Stiemann
RE: how to get aui-calender selected date value?
11 de Julho de 2014 12:36
Resposta

Kyle Joseph Stiemann

LIFERAY STAFF

Ranking: Expert

Mensagens: 271

Data de entrada: 14 de Janeiro de 2013

Mensagens 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:
 1<div>
 2    <input type="text" id="myDatepicker" />
 3</div>
 4<script type="text/javascript">
 5AUI().use('aui-datepicker', function(A) {
 6    new A.DatePicker({
 7    trigger: '#myDatepicker',
 8    popover: { zIndex: 99999 },
 9    mask: '%d/%m/%y %A',
10    calendar: {
11        minimumDate: new Date(2011,00,01),
12        maximumDate: new Date(2012,08,05),
13        selectionMode: 'multiple'
14    }
15    }).render();
16});
17</script>

- Kyle
Mohammad Azharuddin
RE: how to get aui-calender selected date value?
14 de Julho de 2014 23:23
Resposta

Mohammad Azharuddin

Ranking: Expert

Mensagens: 457

Data de entrada: 17 de Setembro de 2012

Mensagens 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
Kyle Joseph Stiemann
RE: how to get aui-calender selected date value?
15 de Julho de 2014 06:52
Resposta

Kyle Joseph Stiemann

LIFERAY STAFF

Ranking: Expert

Mensagens: 271

Data de entrada: 14 de Janeiro de 2013

Mensagens 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
Mohammad Azharuddin
RE: how to get aui-calender selected date value?
15 de Julho de 2014 21:16
Resposta

Mohammad Azharuddin

Ranking: Expert

Mensagens: 457

Data de entrada: 17 de Setembro de 2012

Mensagens recentes

Yeah you are right emoticon