DatTimePicker不接受更改 [英] DatTimePicker not accepting changes

查看:83
本文介绍了DatTimePicker不接受更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表单中有一个绑定的DateTimePicker。当我通过点击日期并从日历中选择日期时,它的行为与预期一致。


当我将其值设置为特定日期作为对另一个控件的更改的响应时使用声明形式


dtpkChangeStateDate.Value =今天


DateTimePicker上的显示值暂时变为今天但是一旦我移动专注于另一个控件,它的值返回到更改之前的原始值,通过代码。


非常感谢您的帮助。

解决方案


我无法重现您的问题,当我使用边界数据源设置DatTimePicker控件的值时,它工作正常。 / p>

您能否提供一个简化的例子让我们重现这个问题?因此,我们可以清楚地了解问题。


问候,b
Marvin


I have a bound DateTimePicker in a form. It behaves as expected when I select a date by clicking on it and selecting from the calendar.

When I set its value to a particular date as a response to a change in another control of the form by using a satement as

dtpkChangeStateDate.Value = Today

The displayed value on the DateTimePicker changes momentarily to today but as soon as I move the focus to another control its value returns to the original value it had before changing it, via code.

I would appreciate your assistance very much.

解决方案

Hi,

I failed reproduce your issue, It worked fine when I set the value of the DatTimePicker control with bounding data source.

Could you provide a simplified example for us to reproduce the issue? So we can have a clear idea of figuring out the issue.

Regards,
Marvin


这篇关于DatTimePicker不接受更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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