Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Akash Mohan Patil
Liferay Calender Problem
March 11, 2012 10:27 PM
Answer

Akash Mohan Patil

Rank: Junior Member

Posts: 70

Join Date: December 12, 2010

Recent Posts

Hi Community,
I am facing problem to set the end date. In liferay Calender we can set the maximum year, but not the max Date.
for example: i am using Liferay calender to select date of birth of an user. Here the Maximum Date should not be more than current date. So is their any way to set Max date. please help me to get through this.

Thanks n Regards,
Akash Patil
Aman Jain
RE: Liferay Calender Problem
November 26, 2012 10:35 PM
Answer

Aman Jain

Rank: New Member

Posts: 12

Join Date: May 24, 2012

Recent Posts

Hi,
Did u get the solution for the same?

Regards,
Aman Jain
Juhi Kumari
RE: Liferay Calender Problem
November 26, 2012 11:17 PM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Aman,

We can acheive this using maxDate properties in datepicker of Jquery or AUI both.


Regards
Juhi
Aman Jain
RE: Liferay Calender Problem
December 3, 2012 2:21 AM
Answer

Aman Jain

Rank: New Member

Posts: 12

Join Date: May 24, 2012

Recent Posts

Thanks a lot Juhi,

But can you pleaz provide me the code for the same,and also let me know where I need to make the changes for the same.....


Thanks and Regards,

Aman Jain
Juhi Kumari
RE: Liferay Calender Problem
December 4, 2012 1:00 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Aman,

Paste these lines in your jsp.
 1var date = new Date();
 2dateFormat(date, 'dd/mm/yy');
 3jQuery(function() {
 4    jQuery('#cal,).datepicker({
 5        dateFormat: 'dd/mm/yy',
 6        showOn: "button",
 7        buttonImage: "/images/calendar.png",
 8        buttonImageOnly: true,
 9        maxDate: date
10  });
11});.
12
13
14
15<input type="text" name="cal" id="cal" readonly="readonly"/>


Regards
Juhi
Aman Jain
RE: Liferay Calender Problem
December 5, 2012 4:47 AM
Answer

Aman Jain

Rank: New Member

Posts: 12

Join Date: May 24, 2012

Recent Posts

Dear Juhi,

Thanks for the code.But I want to make changes in Default Calender of Liferay.
When I add a new User in Liferay,it ask for the Birthday,in that Birthday we can select the date even after the current date.I want to restrict that selection in Liferay.
So,pleaz provide me solution for the same.


Regards,
Aman Jain