Click here to Skip to main content
15,898,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can u give the solution for clear the datetimepicker using clear button in vb
Posted
Comments
woutercx 28-Jul-12 7:08am    
You mean you will create a button [Clear] yourself, with code behind it, that clears the selected value of the date box of datetimepicker?

1 solution

It seems like more people have this problem, this is a solution that they propose.

http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/69FD487E-5A04-4ADE-848D-C2669EFFE10B[^]

Add a Label (or some control) as a placeholder for the datetimepicker.. When the user clicks on the placeholder contol, .Hide() that control and .Show() your datetimepicker.

But if you want to have a decent solution, I think you'll have to use this control, that's based on DateTimePicker:

http://social.msdn.microsoft.com/Forums/en/winforms/thread/ee0c5fbe-8d18-4899-8df2-46535b570bb4[^]

The only problem is, it's in C#... I hope you'll be able to translate it to VB.NET.
But there's online C# to VB.NET code converters that can help you a little.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900