从DateTimePicker控件中删除当前日期焦点(Windows窗体) [英] Remove Current Date Focus from DateTimePicker Control (Windows Forms)

查看:79
本文介绍了从DateTimePicker控件中删除当前日期焦点(Windows窗体)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,我想重点关注datetimepicker控件并显示日历.我可以简单地完成任务,但是我想从日历弹出的今天(当前日期)中删除焦点.


有什么主意吗?

谢谢,

Dear All, I would like to focus the datetimepicker control and show up the calender. I can simply do the task but i want to remove the focus from the today date (current date) when the calender pops up.


any idea please?

Thanks,

推荐答案

您所要做的就是将控件的值设置为希望控件关注的日期.
您不能将值设置为null,因为DateTimePicker根本不允许这样做.
All you have to do is set the value of the control to the date that you want it to focus on.
You can''t set the value to null because the DateTimePicker simply doesn''t allow for that.


这篇关于从DateTimePicker控件中删除当前日期焦点(Windows窗体)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆