Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF DatePicker SelectedDate Binding Format

$
0
0

Hi,

I am using WPF DatePicker Control which is bound to DateTime field. Now I used stringformat property of binding like below to specify dateformat :

 <DatePicker SelectedDate="{Binding Path = SellStartDate, StringFormat = {}{0:dd-MM-yyyy}}"></DatePicker>

When I used the same stringformat with textblock or textbox it worked but not working in case of Datepicker.

I want to display date in dd-MM-yyyy format in datepicker when it bounds from datasource and when user selects a data from calendar.

Please let me know how can I achieve this. Thanks in advance.

Pratham


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>