Just set the property as follows:
When the user press “clear button” or “delete key” do
dtpData.CustomFormat = " " 'An empty SPACE
dtpData.Format = DateTimePickerFormat.Custom
On DateTimePicker1_ValueChanged
event do
dtpData.CustomFormat = "dd/MM/yyyy hh:mm:ss"
More Related Contents:
- BackgroundWorker vs background Thread
- How can I set the opacity or transparency of a Panel in WinForms?
- Best way to hide a window from the Alt-Tab program switcher?
- Is it safe just to set CheckForIllegalCrossThreadCalls to false to avoid cross threading errors during debugging?
- Custom titlebars/chrome in a WinForms app
- Making a WinForms TextBox behave like your browser’s address bar
- Controlling Application’s Volume: By Process-ID
- Winforms – Click/drag anywhere in the form to move it as if clicked in the form caption [duplicate]
- Form_Load() ‘event’ or Override OnLoad()
- Detecting when a SerialPort gets disconnected
- DataGridView: How can I make the enter key add a new line instead of changing the current cell?
- Cause this VB6-like smell, which VB.NET allows, to error instead: WinFormType.InstanceProp=Value [DISABLE My.Forms]
- How to improve painting performance of DataGridView?
- How to get Windows native look for the .NET TreeView?
- Horrible redraw performance of the DataGridView on one of my two screens
- How to use Observable.FromEvent instead of FromEventPattern and avoid string literal event names
- Invoke in Windows Forms
- SendKeys.Send and Windows Key
- How to draw a signature and save it to disc as a Bitmap?
- How do I disable some dates on a DateTimePicker control?
- Form’s TransparencyKey leaves ghastly colored edging [closed]
- How to find the main() entry point in a VB.Net winforms app?
- How to make a Windows Forms .NET application display as tray icon?
- How do you databind to a System.Windows.Forms.Treeview control?
- Assigning a value to ComboBox Items
- What’s the difference between Control.Select() and Control.Focus()?
- How to prevent value changed events from firing on form initialization in .NET?
- Custom button captions in .NET messagebox?
- How to debug GDI Object Leaks?
- How to determine ACTUAL windows form size (with all nonclient elements) when running Aero?