开发者

How to reset the calendar in wpf?

开发者 https://www.devze.com 2023-02-01 04:43 出处:网络
I am trying to set the calendar 开发者_开发技巧to its default (date of today) date. After changing it inside my program but lets say the user chose a date like 2 months backwards of forward,

I am trying to set the calendar 开发者_开发技巧to its default (date of today) date. After changing it inside my program but lets say the user chose a date like 2 months backwards of forward, doing

 calendar.SelectedDate = DateTime.Today;

doesn't help.

Thanks in advance for your help


i found calendar.DisplayDate = DateTime.Today; solves it

0

精彩评论

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