This is a migrated thread and some comments may be shown as answers.

Month Year Picker with Specified Years

9 Answers 266 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Sudhanva
Top achievements
Rank 1
Sudhanva asked on 14 Jul 2009, 12:36 PM
Hi,

I have gone through the following link.

http://www.telerik.com/community/forums/aspnet-ajax/calendar/datepicker-without-calendar.aspx


I need a month year picker, with the Year list as specified. Eg: if i will select 2009 from some control, and in my Month-Year Picker i need to show only previous three years. (i.e. 2006, 2007, 2008).

Help me.

Thanks & Regards,
Sudhanva.

9 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 17 Jul 2009, 11:45 AM
Hi Sudhanva,

Please review the attached sample project. It is based on the project you referenced in our Knowledge Base but is modified to achieve the required result.

Hope this helps.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sudhanva
Top achievements
Rank 1
answered on 17 Jul 2009, 12:53 PM
Hi Martin,

Thanks for that.

And every click of OK button is decrementing the years. How can i avoid this?.

Please help.

Thanks a ton,

Sudhanva
0
Martin
Telerik team
answered on 22 Jul 2009, 03:59 PM
Hello Sudhanva,

Please note that using Javascript on the client you can get the functionality you want. RadDatePicker can be used in many different scenarios and i believe that based on the sample project and our documentation you can achieve yourself the functionality that best suits your intention.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sudhanva
Top achievements
Rank 1
answered on 23 Jul 2009, 10:38 AM
Hi Martin,

Thanks for the reply.

Where can i call this function, when we have master page?

I have put this function in the content page, but it is not getting called. :(

Please help.

Thanks & Regards,
Sudhanva
0
Martin
Telerik team
answered on 24 Jul 2009, 12:47 PM
Hello Sudhanva,

Please review the attached project and let me know if you need further assistance.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tom Ray
Top achievements
Rank 1
answered on 02 Jun 2010, 11:01 AM
Your samples work great when you have only one datepicker on the page.  I have two on the page and need both to show month only.
0
Martin
Telerik team
answered on 04 Jun 2010, 04:36 PM
Hello Tom Ray,

I have attached a modified version of the sample project that demonstrates the desired functionality. Please give it a try and let me know if it works for your scenario.

Regards,
Martin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tom Ray
Top achievements
Rank 1
answered on 20 Jun 2010, 08:14 AM
Thank you very much for your help.  One issue we are having is that it doesn't take into account the minimum date set.  so if we set minimum date as 01 Jun 2010 then we shouldn't be able to pick a day in May or before.    Is there a way to do that check and disallow the Ok button to be clicked with an error message inside of the date picker?
0
Martin
Telerik team
answered on 21 Jun 2010, 04:33 PM
Hello Tom Ray,

By design If you set a valid value to the Min / MaxDate properties and select a month that is out of this range, the embedded DateInput control will fire the OnError client side event, and its invalid style will be applied. This way the user will be prevented from selecting an invalid month.

Certainly, you can implement your own client-side code that check whether the selected month is in the specified range and disable the OK button in case the selection is invalid. I am afraid that currently this functionality is not supported out-of-the box.

I hope this helps,
Martin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Calendar
Asked by
Sudhanva
Top achievements
Rank 1
Answers by
Martin
Telerik team
Sudhanva
Top achievements
Rank 1
Tom Ray
Top achievements
Rank 1
Share this question
or