This is a migrated thread and some comments may be shown as answers.

Watermark in telerik datepicker and timepicker

3 Answers 162 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Triet Nguyen Cong
Top achievements
Rank 2
Triet Nguyen Cong asked on 06 May 2010, 05:59 PM
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

3 Answers, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 12 May 2010, 08:14 AM
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.
0
Triet Nguyen Cong
Top achievements
Rank 2
answered on 18 May 2010, 10:13 AM
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
0
Pana
Telerik team
answered on 19 May 2010, 11:05 AM
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.
Tags
General Discussions
Asked by
Triet Nguyen Cong
Top achievements
Rank 2
Answers by
Pana
Telerik team
Triet Nguyen Cong
Top achievements
Rank 2
Share this question
or