Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding to Date with Null allowed
Message
 
To
07/06/2006 17:42:35
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01127709
Message ID:
01128014
Views:
20
Jeff,

>I'm trying to allow the user to enter a date that may be null (i.e. no entry). The specific case is the termination date for an employee (I haven't installed the psychic module yet).
>
>I tried the DateTimePicker, but when it appears it has a date (when it was added to the form) and I can't find any information on how to clear it. Changing it is no problem, but I can't figure out how to clear it.
>
>My next guess was to use a MaskedEditBox, but it used the Date.ToString() method and got all sorts of interesting stuff.
>
>I would really like to avoid hooking into the post-navigate to fill in a masked text box, then hook into the validate event and validate the data and store it into the proper column in the MM data object.
>
>I think (hope) I'm missing something obvious.

Unfortunately, you're not...there's really no straightforward way to clear a date from the DateTimePicker. I've seen posts where developers have created a custom control that includes both a DataTimePicker and a check box...the user clicks the check box to clear the DateTimePicker date.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform