Reputation: 1321
I want to use Datepicker control, but with only YEAR displayed and shown to user for edit. Is it possible to remove the month and day fields?
Upvotes: 0
Views: 1480
Reputation: 437
I used ValueStringFormat="{}{0:yyyy} for toolkit:DatePicker, which displays only Year but sadly still shows days and months for editing. Or you can use Longlistpicker which is described in detail here.
Upvotes: 0
Reputation: 36
Check out Telerik controls for Windows Phone. It provides a very easy way to do formatting of the DatePicker popup. In your case I believe you would want to use this xaml
<telerikInput:RadDatePicker x:Name="radDatePicker" SelectorFormat="y" />
Here's the documentation for customizing Telerik controls Telerik DatePicker documentation
Upvotes: 1
Reputation: 8126
Silverlight Toolkit
comes in source codes also, so you can add code files that used DatePicker
and modify Picker Page
. I don't see easiest way to modify/reproduce date picker
Upvotes: 2
Reputation: 7233
The DatePicker control in the Silverlight for Windows Phone Toolkit doesn't have that kind of direct customization!
You'll have to change the picker control and the full page it uses; you can check here for some info about DatePicker customization, though it is quite sparse...
Upvotes: 5