Can the Date-Time picker value be set to characters (or cleared)?

Howdy folks,

We have an application that uses a Date-Time picker. Currently it's set to default to today's date. The users don't like that because they normally need to enter a date 1 to 3 days ago. Instead of having a default date that they could forget to enter, they would like to have the field default to the text 'MM/DD/YYYY' and force the user to enter it.

I thought that perhaps we could just set the default date to 1/1/1900 or something like that and then check if that's the value when they submit the form submit the form (Windows Forms App, not web). They didn't like that idea and would like it to read 'MM/DD/YYYY' and force the user to enter something. If that's not possible, they would like it to be blank and force the user to enter something.

So, any ideas It doesn't look like it's possible to have a non-date in there.

Thanks,
Dan


Answer this question

Can the Date-Time picker value be set to characters (or cleared)?

  • mjoc69

    use the ShowCheckBox, property, set checked to false.

    Other than that, no. Microsofts DateTimePicker manages a DateTime, which is a ValueType which can't be null. (at least in 1.1)

    I use infragistics controls and this isnt an issue.

    infragistics netadvantage is well worth the 400 bux.

    Buy the subscription for 200 more and get the source code- well worth the price of admission.



  • Aldrenn

    the infragistics is documented. . . its just so damned hard to find.

    When they string up the guys that wrote VBSUX. . . string up the guys that created PDF's right behind them!



  • Matt Ahlgren

    We have Infragistics. In fact, many of the other controls on the form are Infragistics controls (tabs, buttons, data grid). I'll look into using its date-time picker. The lack of documentation by Infragistics makes it hard to figure out what I'm doing though.

    Thanks for the advice,
    Dan

  • Can the Date-Time picker value be set to characters (or cleared)?