RadMonthYearPicker Bicker

8 posts, 0 answers
  1. Scott MacFarlane
    Scott MacFarlane avatar
    5 posts
    Member since:
    Aug 2008

    Posted 16 Jun 2011 Link to this post

    Hi,

    I tried using the new RadMonthYearPicker and am quite dissapointed as Telerik seems to have
    created this new control and yet totally missed the point.

    Is not the whole purpose of the control to select - or enter - just the month and year, and not have a
    day whatsoever? 

    If you setup the date format as MM/yyyy and the display format at MM/yyyy (the first thing i tried and
    imho the first thing most anybody will try) - the control doesn't work at ALL!!

    I've seen all these huge, extended, hard-coding, client-side, work-arounds, of users trying to make
    it do just that.

    While I know any date variable or database value must have a day, why don't you just add another
    paramater to specify the default day value returned and make it work as expected?

    Just my two sense,
    Scott
  2. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 22 Jun 2011 Link to this post

    Hello Scott,

    If you set DateFormat string to "MM/yyyy"  and the entered value contains only "month" and "year" parts (for example "06/2011"), the embedded parsing mechanism of the RadDateInput control will parse the "month" part as a day and apply the current month to form the final date. In order to avoid the built-in parsing the developer must construct the date manually before it is applied to the input.
    On the following code library you could find how to do that:
    http://www.telerik.com/community/code-library/aspnet-ajax/calendar/how-to-use-raddatepicker-with-a-quot-mm-yyyy-quot-formatted-dateinput.aspx

    Additionally the purpose of the RadMonthYearPicker control is to choose month and year. However the .NET framework does not have structure which could keep only month and year, so the MonthYearPicker keeps month and year into the DateTime object. Into this object the date part is populated by default from the picker control. The user could not see the date part and could not change it. The end user could  choose or change only month and year. The developers could get the selected date into the code behind and extract the month and year part from it and do whatever they want with this parts. Also into the code behind you could get the entire date object kept into the SelectedDate property of the control and save it into the database or operate directly with it.

    Kind regards,
    Radoslav
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. RAY
    RAY avatar
    2 posts
    Member since:
    Jul 2006

    Posted 25 Oct 2011 Link to this post

    I agree with Scott in that (at least in the US), the most popular format for month and year would be "MM/yyyy".  The example,  "06/2011", should be interpreted as June 2011 (not current month 6th day 2011).   Unless there is some technical reason why this cannot work, someone really missed the boat on designing this thing.  What it should do is parse the "06/2011" and default the day to 1.   Then, the result fits the standard .NET datetime structure.  Then, in the DateTime structure, we can easily pick up the month and year parts.  
  5. RAY
    RAY avatar
    2 posts
    Member since:
    Jul 2006

    Posted 25 Oct 2011 Link to this post

    I agree with Scott in that (at least in the US), the most popular format for month and year would be "MM/yyyy".  The example,  "06/2011", should be interpreted as June 2011 (not current month 6th day 2011).   Unless there is some technical reason why this cannot work, someone really missed the boat on designing this thing.  What it should do is parse the "06/2011" and default the day to 1.   Then, the result fits the standard .NET datetime structure.  Then, in the DateTime structure, we can easily pick up the month and year parts.  
  6. Pete
    Pete avatar
    4 posts
    Member since:
    Oct 2004

    Posted 25 Oct 2011 Link to this post

    +1   

    It seems as though the MonthYear Picker has no purpose if it doesn't work how Ray described ???

    Cheers
  7. Rodrigo
    Rodrigo avatar
    4 posts
    Member since:
    Nov 2012

    Posted 23 Jan 2013 Link to this post

    +1
  8. Jeffrey
    Jeffrey avatar
    2 posts
    Member since:
    Nov 2012

    Posted 26 May 2013 Link to this post

    You completely missed Scott's point. Which may be why your developers and designers completely missed the mark on this control.
  9. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 27 May 2013 Link to this post

    Hello,

    Our developers have changed the behavior of date parsing into the RadMonthYearPicker control and now it works as expected. If you have "MM/yyyy" as format string and the user enter "06/2011" the control will interpret this as June 2011. The improvement will be included into the official Q2 release which will be live in the middle of next month.

    Regards,
    Radoslav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017