16,553
社区成员
发帖
与我相关
我的任务
分享
Public Class JPDateTimePicker
Inherits System.Windows.Forms.DateTimePicker
Public Sub New()
'MyBase.MinDate = Date.Parse("1000-01-01")
MyBase.Format = DateTimePickerFormat.Custom
MyBase.CustomFormat = "平成yy年MM月"
End Sub
Public Shadows Property Value As Date
Get
Return MyBase.Value.AddYears(-12)
End Get
Set(value As Date)
If value < Date.Parse("1989-01-08") Then
Throw New Exception("时间早于1989年1月8日")
End If
MyBase.Value = value.AddYears(12)
End Set
End Property
End Class
暂时没有更好的办法。。