Default value

2 posts, 0 answers
  1. Xaria D
    Xaria D avatar
    68 posts
    Member since:
    May 2010

    Posted 26 Oct 2010 Link to this post

    I have a DtaeTime Picker in my application as follows

    <Input:RadDateTimePicker x:Name="dateTimePicker" Width="150" Margin="3,0,0,0" DateTimeWatermarkContent="DateTime" SelectedValue="{Binding StartDateTime, Mode=TwoWay}"   VerticalAlignment="Center" SelectionChanged="dateTimePicker_SelectionChanged" />

    and in the code behind
      private DateTime _startDateTime = DateTime.Now;
           public DateTime StartDateTime
                   return _startDateTime ;
                   if (_startDateTime != value)
                       _startDateTime = value;
    public event PropertyChangedEventHandler PropertyChanged;
           private void OnPropertyChanged(string propertyName)
               if (this.PropertyChanged != null)
                   this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

    But when I run the app, there is no value set for The DateTimePicker control
  2. George
    George avatar
    1332 posts

    Posted 29 Oct 2010 Link to this post

    Hi Xaria,

    I tried to reproduce the problem, but to no avail. Everything works fine. Attached you can find the sample. Please, let me know if I am doing something wrong.

    All the best,
    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 R3 2016 release webinar banner
Back to Top