A Bug about System. Windows. Forms. DateTimePicker, system. windows. forms

Source: Internet
Author: User

A Bug about System. Windows. Forms. DateTimePicker, system. windows. forms

I received a feedback from the customer today, saying that their system could not query the bill for July. The reason is that they could not select July, and they could not select July ???, Start vs immediately and run the system. It should be the last year's system, and the test data was last year. The data for March was queried. Everything is OK.

Let the customer remotely and show me the operation. I don't believe it. It's true that a remote user can select and input in August and August, but in August, either manually input or selected input is a failure. Disconnected from the remote local device and failed to input.

After a long morning of hard work, I just couldn't find any problems. Why? Du Niang, let's see if July is really haunted, 29 days? Not 28 days? Have you gone through or have you gone crazy? Good is 29 days. Well, it is estimated that Microsoft did not expect that the 28-day Truth of July was broken.

 

I use. Net4.0, And the DateTimePicker configuration is customized. For example, yyyy, MM, and ShowUpDown = true.

Then I tried to set the format to yyyy, MM, dd, and found that there was no problem with the input time in January,

Set ShowUpDown to false, and the input in February is OK,

Set ShowUpDown to true and the format to yyyy-MM. The input and selection pages in February are correct.

It seems that only when ShowUpDown is set to false and the format is set to yyyy, MM, may not be selected in February.

The solution is to set the custom display to yyyy, MM, dd, And Then shorten the control so that the customer can only see the year and month.

Do you know there are other solutions? Tell me what you want to know.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.