Use DatePicker only to choose Year and Month

7 posts, 0 answers
  1. Luis Antunes
    Luis Antunes avatar
    2 posts
    Member since:
    Feb 2010

    Posted 18 Feb 2010 Link to this post

    Hi!

    I would like to know if there is a way of using DatePicker only to choose year and month, without specifying the day.
    I can use the DisplayMode="YearView", but when I click in some month, it opens the month view.

    Is there a way of doing this?

    Best regards!
    Luis Antunes
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 19 Feb 2010 Link to this post

    Hello Luis Antunes,

    There is no way to accomplish this functionality. The RadDatePicker is only able to select a full date.

    Kind regards,
    Kaloyan
    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.
  3. DevCraft banner
  4. Luis Antunes
    Luis Antunes avatar
    2 posts
    Member since:
    Feb 2010

    Posted 19 Feb 2010 Link to this post

    Ok.
    Thanks for the answer anyway.

    I leave the suggestion of this functionality though :)

    Best Regards
    Luis Antunes
  5. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 06 May 2013 Link to this post

    +1
    Would be nice to have such fonctionality
    meanwhile we have to do our own control
  6. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 09 May 2013 Link to this post

    Hi Marc,

    Actually this can now be easily achieved by setting the Culture.DateTineFormat.ShortDatePattern property of the RadDatePicker. Here is sample code:
    var culture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
    culture.DateTimeFormat.ShortDatePattern = "MM yyyy";
    this.DatePicker.Culture = culture;
     
    Greetings,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 09 May 2013 Link to this post

    And you forgot to mention that we need to set the property DateSelectionMode to Month
  8. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 13 May 2013 Link to this post

    Hi Marc,

    You are absolutely right. Thank you for this clarification.

    Kind regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner