In this article I am going to talk about the key properties, events,main features and all about the Windows Phone 8 DatePicker and TimePicker controls in details.
Two of the components in the Silverlight Toolkit are DatePicker and TimePicker. They are UI elements that will automatically provide you with a TextBox input and when the user selects it, the picker will display form where you can choose another date/time using infinite scrolling. DatePicker and TimePicker are UX controls that fit in the Windows Phone 8 Design Guidelines. Basically the both components derive from the same base class: DateTimePickerBase and have the same public API. So the only difference is that TimePicker represents the data in a ShortTimePattern format (time) while DatePicker present dates.
OUT PUT
To begin using DatePicker/TimePicker first add a reference to the Microsoft.Phone.Controls.Toolkit.dll assembly which is installed with the toolkit and you can find it in :
C:\Program Files (x86)\Microsoft SDKs\Windows
Phone\v8.0\Toolkit\Nov10\Bin\Microsoft.Phone.Controls.Toolkit.dll.
You will also need to add the "toolkit" prefix declaration. Make sure that your page declaration includes the "toolkit" namespace:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
The sample code should looks like:
<toolkit:DatePicker x:Name="datePicker" Value="2/3/2010"/>
<toolkit:TimePicker x:Name="timePicker"/>