MonthYearPicker SelectedDate

4 posts, 0 answers
  1. Lane
    Lane avatar
    13 posts
    Member since:
    Nov 2011

    Posted 24 Apr 2014 Link to this post

    I was looking for documentation on what the date is supposed to be of the .NET DateTime object that is returned from SelectedDate.

    I would have hoped it would be the first day of the selected month/year.  But I have just discovered that sometimes it is, and sometimes it's not.

    How about fixing this so it always returns the first day of the month?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Apr 2014 in reply to Lane Link to this post

    Hi Lane,

    I guess that you want to access the first day of the month from the RadCalendar, please have a look into the C# code snippet which works fine at my end.

    VB:
    Protected Sub radcalFirstDay_DayRender(sender As Object, e As Telerik.Web.UI.Calendar.DayRenderEventArgs)
                'your code
        If e.Day.[Date].Day = 1 Then
        End If
    End Sub

    Please elaborate your requirement if it doesn't help.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lane
    Lane avatar
    13 posts
    Member since:
    Nov 2011

    Posted 25 Apr 2014 in reply to Shinu Link to this post

    Thanks Shinu, but I must not have been clear in my original post.

    I am talking about the RadMonthYearPicker, not the RadCalendar.

    My concern is that the SelectedDate property of the RadMonthYearPicker doesn't always return the first day of the month.  I think it should.  I think this is a bug, or at the very least, poor implementation.

    I know how to get the first day of the month.  I don't really need help with that.  Just posting this for Telerik to see if they can provide an explanation.  (I hope they monitor this forum.)
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Apr 2014 in reply to Lane Link to this post

    Hi Lane,

    The selectedDate property of the RadMonthYear will return the date content of RadMonthYearPicker that we select. The default value of the selectedDate is the MinDate. So if we are not selecting any particular date from the RadMonthYearPicker it will return the MinDate value as the SelectedDate of the RadMonthYearPicker that is the expected behavior of the control.

    Thanks,
    Shinu.
Back to Top