TRzDBDateTimePicker show blank when value is Null?

Home Forums Konopka Signature VCL Controls (formerly Raize Components) TRzDBDateTimePicker show blank when value is Null?

Viewing 1 reply thread
  • Author
    Posts
    • #417

      I’ve got a table with two dates and I’m using TRzDBDateTimePicker component to let the user select dates for those fields but more than 90% of the table has those fields set to null. So when the field is null the component shows 12/1899 (I’m not using a day just a month and year) is there any way to show blank until the user selects a date rather than 12/1899?

    • #420
      Ray Konopka
      Keymaster

        Hi Chris,

        You may have noticed that the TRzDBDateTimePicker has a grayed icon in the component palette. That is because it is deprecated. And the reason it is deprecated is precisely for the reason that you are running into. Because the TRzDBDateTimePicker (and TRzDateTimePicker) are descendants of the DateTime Picker Windows control, we are limited in what can be done with the content. The handling of null values is just one instance.

        Instead, we recommend using the TRzDBDateTimeEdit component. The component does a much better job of handling null fields and allows for freeform input, making it more flexible. Plus, if you are editing field that contains both Date and Time values, you can drop two TRzDBDateTimeEdit controls onto your form and point them both to the same DB Field–one control edits the Date portion and the other edits the Time.

        Ray

    Viewing 1 reply thread
    • You must be logged in to reply to this topic.