Date Picker Text Input Events

3 posts, 0 answers
  1. Peter
    Peter avatar
    11 posts
    Member since:
    Nov 2010

    Posted 17 Nov 2010 Link to this post

    Hi There,

    I noticed in silverlight that the UpdateSourceTrigger in a binding cannot be set to PropertyChanged like it can in WPF.

    I have a couple of DatePicker controls, and the binding must be updated as soon as someone enters some text into the control, not when the control looses the focus.

    Any ideas?

    What would work OK is if I could subscribe to some event that would fire as soon as I enter something into the Date Picker controls. I have tried the various events available and couldn't find anything that worked.

    There are various solutions such as this, but they only seem to apply to TextBoxes,

    My question seems to be related to this,

    Thanks, Peter.
  2. Peter
    Peter avatar
    11 posts
    Member since:
    Nov 2010

    Posted 17 Nov 2010 Link to this post

    Just to let you know what I have found, which seems to work.

    On the RadDatePicker control there is a property called CurrentDateTimeText. I am binding to that, not to get the date (I am also binding to the SelectedValue to get the date) but just so that I can tell if the user has entered anything into the field or not.

    If the setter on my view model property gets called (for the CurrentDateTimeText) I store that value, and call notifypropertychanged on some other properties, and hey presto it works.

    What I am doing is making a button enabled or disabled based on whether anything is entered into that date field.

    Unless you see any issues I will go for this solution.


  3. DevCraft banner
  4. Konstantina
    Konstantina avatar
    2332 posts

    Posted 23 Nov 2010 Link to this post

    Hello Peter,

    This seems as a suitable workaround for your case. We are glad that you have found a solution yourself.

    Please let us know if you have any other questions about our controls.

    Kind regards,
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top