Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Time Picker Control
Message
 
To
22/04/2004 12:54:11
Dave Sonier
Technologies Nter inc.
Gatineau, Quebec, Canada
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00897277
Message ID:
00897279
Views:
12
I know it's not the ideal solution but you may want to play with the CustomFormat property:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Me.DateTimePicker1.Format = DateTimePickerFormat.Custom

Me.DateTimePicker1.CustomFormat = " "

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.DateTimePicker1.Format = DateTimePickerFormat.Custom

Me.DateTimePicker1.CustomFormat = " "

End Sub

Private Sub DateTimePicker1_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.DropDown

Me.DateTimePicker1.CustomFormat = "yyyy/MM/dd"

End Sub

Private Sub DateTimePicker1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DateTimePicker1.KeyDown

If e.KeyCode = Keys.Delete Then

Me.DateTimePicker1.CustomFormat = " "

ElseIf Me.DateTimePicker1.CustomFormat = " " AndAlso _

(e.KeyValue >= 48 AndAlso e.KeyValue <= 57) OrElse _

(e.KeyValue >= 96 AndAlso e.KeyValue <= 105) _

Then

Me.DateTimePicker1.CustomFormat = "yyyy/MM/dd"

End If

End Sub
>Hi,
>
>I used the DateTimePicker Control...But I can't put a blank value in the property Date ? I know that it exist the ShowCheckBox property but I want another solution.
>
>Thank in advance.
>
>Dave
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform