Foren

Home » Alloy UI » English

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
how to get aui-calender selected date value? Srikanth Davuluri 2. Januar 2012 21:02
RE: how to get aui-calender selected date value? Juhi Kumari 2. Januar 2012 21:25
RE: how to get aui-calender selected date value? Srikanth Davuluri 2. Januar 2012 21:40
RE: how to get aui-calender selected date value? Juhi Kumari 2. Januar 2012 22:10
RE: how to get aui-calender selected date value? Srikanth Davuluri 2. Januar 2012 22:24
RE: how to get aui-calender selected date value? Bavithra Rajendran 2. Januar 2012 23:40
RE: how to get aui-calender selected date value? Srikanth Davuluri 2. Januar 2012 23:13
RE: how to get aui-calender selected date value? Bavithra Rajendran 3. Januar 2012 01:02
RE: how to get aui-calender selected date value? Srikanth Davuluri 3. Januar 2012 03:09
RE: how to get aui-calender selected date value? RathnaDevi Chellaiah 26. März 2012 22:30
RE: how to get aui-calender selected date value? ruchi sharma 18. April 2012 07:52
RE: how to get aui-calender selected date value? Srikanth Davuluri 18. April 2012 21:15
RE: how to get aui-calender selected date value? ruchi sharma 23. April 2012 08:28
RE: how to get aui-calender selected date value? Sanket Gosavi 9. Mai 2012 08:59
RE: how to get aui-calender selected date value? Mohammad Azharuddin 8. Juni 2014 07:54
RE: how to get aui-calender selected date value? kumar E 22. Juni 2014 23:25
RE: how to get aui-calender selected date value? Kyle Joseph Stiemann 11. Juli 2014 12:36
RE: how to get aui-calender selected date value? Mohammad Azharuddin 14. Juli 2014 23:23
RE: how to get aui-calender selected date value? Kyle Joseph Stiemann 15. Juli 2014 06:52
RE: how to get aui-calender selected date value? Mohammad Azharuddin 15. Juli 2014 21:16
RE: how to get aui-calender selected date value? Mazhar Alam 7. November 2012 02:08
Srikanth Davuluri
how to get aui-calender selected date value?
2. Januar 2012 21:02
Antwort

Srikanth Davuluri

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 7. Juni 2011

Neue 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.
Juhi Kumari
RE: how to get aui-calender selected date value?
2. Januar 2012 21:25
Antwort

Juhi Kumari

Rang: Expert

Nachrichten: 347

Eintrittsdatum: 12. Dezember 2011

Neue Beiträge

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. Januar 2012 21:40
Antwort

Srikanth Davuluri

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 7. Juni 2011

Neue 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.
Juhi Kumari
RE: how to get aui-calender selected date value?
2. Januar 2012 22:10
Antwort

Juhi Kumari

Rang: Expert

Nachrichten: 347

Eintrittsdatum: 12. Dezember 2011

Neue 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.
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. Januar 2012 22:24
Antwort

Srikanth Davuluri

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 7. Juni 2011

Neue 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.
Bavithra Rajendran
RE: how to get aui-calender selected date value?
2. Januar 2012 23:40
Antwort

Bavithra Rajendran

LIFERAY STAFF

Rang: Regular Member

Nachrichten: 123

Eintrittsdatum: 7. Oktober 2009

Neue Beiträge

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. Januar 2012 23:13
Antwort

Srikanth Davuluri

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 7. Juni 2011

Neue 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.
Bavithra Rajendran
RE: how to get aui-calender selected date value?
3. Januar 2012 01:02
Antwort

Bavithra Rajendran

LIFERAY STAFF

Rang: Regular Member

Nachrichten: 123

Eintrittsdatum: 7. Oktober 2009

Neue Beiträge

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. Januar 2012 03:09
Antwort

Srikanth Davuluri

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 7. Juni 2011

Neue Beiträge

Thanks for your response

it is working fine...
RathnaDevi Chellaiah
RE: how to get aui-calender selected date value?
26. März 2012 22:30
Antwort

RathnaDevi Chellaiah

Rang: Junior Member

Nachrichten: 29

Eintrittsdatum: 26. März 2012

Neue Beiträge

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. April 2012 07:52
Antwort

ruchi sharma

Rang: Junior Member

Nachrichten: 95

Eintrittsdatum: 24. März 2011

Neue 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
Srikanth Davuluri
RE: how to get aui-calender selected date value?
18. April 2012 21:15
Antwort

Srikanth Davuluri

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 7. Juni 2011

Neue 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
ruchi sharma
RE: how to get aui-calender selected date value?
23. April 2012 08:28
Antwort

ruchi sharma

Rang: Junior Member

Nachrichten: 95

Eintrittsdatum: 24. März 2011

Neue 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
Sanket Gosavi
RE: how to get aui-calender selected date value?
9. Mai 2012 08:59
Antwort

Sanket Gosavi

Rang: Junior Member

Nachrichten: 35

Eintrittsdatum: 24. Dezember 2011

Neue 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
Mazhar Alam
RE: how to get aui-calender selected date value?
7. November 2012 02:08
Antwort

Mazhar Alam

Rang: Regular Member

Nachrichten: 201

Eintrittsdatum: 25. November 2011

Neue Beiträge

Helpful post Bavithra!!
Mohammad Azharuddin
RE: how to get aui-calender selected date value?
8. Juni 2014 07:54
Antwort

Mohammad Azharuddin

Rang: Expert

Nachrichten: 471

Eintrittsdatum: 17. September 2012

Neue Beiträge

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. Juni 2014 23:25
Antwort

kumar E

Rang: Junior Member

Nachrichten: 64

Eintrittsdatum: 3. Oktober 2012

Neue Beiträge

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. Juli 2014 12:36
Antwort

Kyle Joseph Stiemann

LIFERAY STAFF

Rang: Expert

Nachrichten: 437

Eintrittsdatum: 14. Januar 2013

Neue 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:
 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. Juli 2014 23:23
Antwort

Mohammad Azharuddin

Rang: Expert

Nachrichten: 471

Eintrittsdatum: 17. September 2012

Neue 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
Kyle Joseph Stiemann
RE: how to get aui-calender selected date value?
15. Juli 2014 06:52
Antwort

Kyle Joseph Stiemann

LIFERAY STAFF

Rang: Expert

Nachrichten: 437

Eintrittsdatum: 14. Januar 2013

Neue 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
Mohammad Azharuddin
RE: how to get aui-calender selected date value?
15. Juli 2014 21:16
Antwort

Mohammad Azharuddin

Rang: Expert

Nachrichten: 471

Eintrittsdatum: 17. September 2012

Neue Beiträge

Yeah you are right emoticon