开发者

How to change DatePicker DisplayDate?

How can i change DatePicke开发者_开发技巧r DisplayDate from mm/dd/yyyy to yyyy-mm-dd ?


Change the SelectedDateFormat to 'yyyy-MM-dd'

If you want to set the culture correctly for your entire app, look at this question: StringFormat Localization issues in wpf.

You need this code somewhere that runs on startup.

FrameworkElement.LanguageProperty.OverrideMetadata( typeof(FrameworkElement), 
    new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜