CLEARDATEPICKER

If you want to call, you can use this script.

if IsDBNull(DataGridView1.CurrentRow.Cells(17).Value) Then
ClearDatePicker(dtSold)
Else
dtSold.Text = DataGridView1.CurrentRow.Cells(17).Value
End If

This is procedure or function.

Private Sub ClearDatePicker(ByVal DatePicker As DateTimePicker)

DatePicker.CustomFormat = ” ”

DatePicker.Format = DateTimePickerFormat.Custom

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *