SelectedDate property

4 posts, 0 answers
  1. Srinivas
    Srinivas avatar
    32 posts
    Member since:
    Aug 2010

    Posted 28 Sep 2010 Link to this post



    Hello telerik,
    the selecteddate property is returnnig a selected a date with a time stamp '12:00' ..which is not the time i select from the datetimepicker control. how to get rid of this?

    i tried , 'selecteddate.value.date ' ...its of no use. still its giving me with  12:00

    Thanks,
    Srinivas
  2. George
    Admin
    George avatar
    1332 posts

    Posted 28 Sep 2010 Link to this post

    Hello Srinivas,

    I would suggest you to use SelectedValue instead of SelectedDate property. SelectedDate returns only the selected value from the date part of the RadDateTimePicker control. SelectedValue returns the selected date and time value.

    I hope this helps! 

    Sincerely yours,
    George
    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. UI for WPF is Visual Studio 2017 Ready
  4. Srinivas
    Srinivas avatar
    32 posts
    Member since:
    Aug 2010

    Posted 28 Sep 2010 Link to this post

    Hello george,
    Thanks for the reply.  please find the more details of my requirement.

    I am writing a custom control for datetimepicker . In that i need a property by name 'selected date' which only gives me the date part only. i have written the dependency proprty of type  Datetime? . which is resulting me a seleted date with 12:00 included to the selecteddate. i dont wont that 12:00 with the resulted value. I dont want to use selectedvalue because it includes both date and time.
    i need only date part.


    Regards,
    Srinivas

  5. George
    Admin
    George avatar
    1332 posts

    Posted 01 Oct 2010 Link to this post

    Hi Srinivas,

    Unfortunately, there is no date type in .Net framework. If you want to extract only the date, you could use SelectedValue.Value.ToShortDateString() method. This returns the selected date in a string format.

    I hope this helps.
     

    Sincerely yours,
    George
    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