WPF 中的日期选择器今日选项

发布于 2024-08-31 01:00:19 字数 83 浏览 4 评论 0原文

日期选择器控件中是否有任何可用的属性、选项,以便用户想要从当前日期的任何日期中选择今天? 例如,如果用户查看去年的当前月份,那么他可以选择选择当前日期?

Is there any property , option available in the date picker control so that if user want to select today from any date from current date ?
e.g if user is view current month of last year then he has the option to select current date ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

只有一腔孤勇 2024-09-07 01:00:19

只需查看此链接以及他们如何在 Datepicker WPF 工具包中实现“今日”按钮)。此链接来自 WPFToolkit 讨论论坛。也许这会对你有所帮助。

http://wpf.codeplex.com/Thread/View.aspx?ThreadId= 85516

just see this link and how they are implementing the Today button in the Datepicker WPF Toolkit). This link is from the WPFToolkit discussion forum. May be this will help you.

http://wpf.codeplex.com/Thread/View.aspx?ThreadId=85516

就像说晚安 2024-09-07 01:00:19

我认为没有办法直接在控件上有一个按钮。
您可以使用控件外部的按钮或类似的按钮来设置当前日期。

或者你构建一个自定义控件......

i think there is no option that there is a button directly in the control.
You can use a button outside the control, or something like this to set the current date.

Or you build a custom control....

不疑不惑不回忆 2024-09-07 01:00:19

我只是拼凑了一个简单的例子。它是 VS 2010。www.mbgr.de/CurrentDateWpf.zip。
这个根本没有任何保证。使用风险自负:-)

I just hacked together a simple example. It is VS 2010. www.mbgr.de/CurrentDateWpf.zip.
No warranty at all on this one. Use at your own risk :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文