Month Year Picker with Specified Years

10 posts, 0 answers
  1. Sudhanva
    Sudhanva avatar
    27 posts
    Member since:
    Apr 2009

    Posted 14 Jul 2009 Link to this post

    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.
  2. Martin
    Admin
    Martin avatar
    833 posts

    Posted 17 Jul 2009 Link to this post

    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.
  3. Sudhanva
    Sudhanva avatar
    27 posts
    Member since:
    Apr 2009

    Posted 17 Jul 2009 Link to this post

    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
  4. Martin
    Admin
    Martin avatar
    833 posts

    Posted 22 Jul 2009 Link to this post

    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.
  5. Sudhanva
    Sudhanva avatar
    27 posts
    Member since:
    Apr 2009

    Posted 23 Jul 2009 Link to this post

    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
  6. Martin
    Admin
    Martin avatar
    833 posts

    Posted 24 Jul 2009 Link to this post

    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.
  7. Tom Ray
    Tom Ray avatar
    11 posts
    Member since:
    Oct 2009

    Posted 02 Jun 2010 Link to this post

    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.
  8. Martin
    Admin
    Martin avatar
    833 posts

    Posted 04 Jun 2010 Link to this post

    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.
  9. Tom Ray
    Tom Ray avatar
    11 posts
    Member since:
    Oct 2009

    Posted 20 Jun 2010 Link to this post

    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?
  10. Martin
    Admin
    Martin avatar
    833 posts

    Posted 21 Jun 2010 Link to this post

    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
Back to Top