none
日期控件BUG RRS feed

  • 问题

  • 在窗体内放置一个日期控件,控件属性设置如下:

                this.dateTimePicker1.CustomFormat = "yyyy-MM";
                this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
                this.dateTimePicker1.Location = new System.Drawing.Point(36, 65);
                this.dateTimePicker1.Name = "dateTimePicker1";
                this.dateTimePicker1.ShowUpDown = true;
                this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
                this.dateTimePicker1.TabIndex = 0;
                this.dateTimePicker1.Value = new System.DateTime(2019, 10, 31, 0, 0, 0, 0);

    此时运行项目,选择月份,点击上下箭头,就会报错。

    测试了.net 2.0和4.5都有这个BUG

    2019年10月31日 2:35

全部回复