You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
522 B

Imports System.ComponentModel
<DesignerCategory("Code")>
Public Class NullableDateTimePicker : Inherits DateTimePicker
<Bindable(True)>
Public Shadows Property Value As Date?
Get
If Not Checked Then Return Nothing
Return MyBase.Value
End Get
Set(ByVal value As Date?)
If value.Equals(Me.Value) Then Return
Checked = value.HasValue
If value.HasValue Then MyBase.Value = value.Value
End Set
End Property
End Class