WPF DatePicker default to today's date -


wpf datepicker show 'show calendar' default. want show current/todays date. how do that. tried doing below in constructor won't work,

datepicker.selecteddate = datetime.now.date; 

or

datepicker.displaydate = datetime.now.date; 

please try ....

<my:datepicker selecteddate="{x:static sys:datetime.now}"/> 

add reference

xmlns:sys="clr-namespace:system;assembly=mscorlib" 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -