Watermark in telerik datepicker and timepicker

4 posts, 0 answers
  1. Triet Nguyen Cong
    Triet Nguyen Cong avatar
    78 posts
    Member since:
    Mar 2010

    Posted 06 May 2010 Link to this post

    Hi,

    I have to display watermark in telerik datepicker and timepicker. Example: I want to show "Date Of Birth"  text in a datepicker.

    Please let me know how can I do it.

    Thanks in advance,
    Triet
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 12 May 2010 Link to this post

    Hi Triet Nguyen Cong,

    The RadDatePicker does not support watermark.

    However it can be achieved with some editing of the ControlTemplate of the RadDatePicker and some additional code. I created an Watermark class that has Text attached property. Also I put a TextBlock in the RadDatePicker that has Text bound to that property. The Visibility of that TextBlock is bound with converter to the SelectedDate of the datepicker and it's opacity is set to 0 when the datepicker is focused. I marked the template changes with "NOTE:" comments check them as well as the code behind for the example. You can reuse the code form the example in your project.

    I hope it works well enough for you.

    Kind regards,
    Panayot
    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. Triet Nguyen Cong
    Triet Nguyen Cong avatar
    78 posts
    Member since:
    Mar 2010

    Posted 18 May 2010 Link to this post

    Thank Panayot, it works well. 

     I still have a bit concern, how can I get template from rad control? Example, In Silverlight's controls I can use Expression Blend 3 and then choose "Edit Template" to get template of these controls, but I can't do this with rad control.

    Thanks for your reply,
    Triet
  4. Pana
    Admin
    Pana avatar
    748 posts

    Posted 19 May 2010 Link to this post

    Hello Triet Nguyen Cong,

    We try to support Blend as much as possible. For control that are not editable in blend you can request the Telerik theme files in a Forum or a Support ticket also the Silverlight theme projects are available for download in the distribution packages.

    Best wishes,
    Panayot
    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