Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit How to get dd-MM-yyyy date format in DatePicker control?
3 replies. Latest Post by hoangtuit on November 25, 2008.
(0)
hoangtuit
Member
23 points
35 Posts
11-25-2008 1:03 AM |
I can set dd-MMM-yyy date format in DatePicker, but I can't set dd-MM-yyyy.
This is my code:
private void ToDay_Loaded(object sender, RoutedEventArgs e) { this.ToDay.Text = DateTime.Now.ToString("dd-MM-yyyy"); } private void ToDay_SelectedDateChanged(object sender, SelectionChangedEventArgs e) { this.ToDay.Text = this.ToDay.SelectedDate.Value.ToString("dd-MM-yyyy"); DrawReservation(); }
Please help me.
Prasad B...
170 points
39 Posts
11-25-2008 4:59 PM |
<UserControl x:Class="ClinicalApp.Silverlight xmlns:control="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls"
<UserControl x:Class="ClinicalApp.Silverlight
xmlns
Width
<model:DateFormatter x:Key="DateConverter" />
</UserControl.Resources>
public
{
}
#endregion
Whitewing_s
187 points
107 Posts
11-25-2008 11:11 PM |
Hi hoangtuit,
Add using System.Globalization;using System.Threading; Namespace
And
Thread
11-25-2008 11:43 PM |
Thanks Whitewing_s.
I got it.