ComponentFactory / Krypton

Krypton WinForms components for .NET
BSD 3-Clause "New" or "Revised" License
1.86k stars 681 forks source link

Display Blank (" ") on kryptonDateTimePicker #218

Open paraJdox opened 3 years ago

paraJdox commented 3 years ago

Adding this code will throw this error: System.FormatException: 'Input string was not in a correct format.'

kryptonDateTimePicker.CustomFormat = " ";
kryptonDateTimePicker.Format = DateTimePickerFormat.Custom;

But, when I use that code on a normal datetimepicker it works fine and displays a blank (" ") text on load.

And of course change its value back

private void datetimepicker_ValueChanged( object sender, EventArgs e ) {
     datetimepicker.CustomFormat = "dddd, MMMM dd, yyyy";
}