Solved

Null Value In DateTmePicker

Posted on 2001-08-03
6
177 Views
Last Modified: 2010-04-06
Hey all,

How do I display no values in the DateTimePicker when the user hasn't entered/selected a date?

When I bring up a new entry screen, all the DateTimePicker dates show the date the component was placed on the form. I don't want it to show anything unless data has been entered.

Thanks,
Chad
0
Comment
Question by:dhertzfe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6351302
Hello

  I think you need to override the a method, maybe CheckEmptyDate, but i'm not sure

0
 

Author Comment

by:dhertzfe
ID: 6352280
Hi mnasman,

There is no method like that for TDateTimePicker.


Chad
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6352716
it's protected method for the TDateTimePicker
Prss Control while u move the move above TDateTimePicker, so when u see it in blue color, click on it, and u will see the source of that control, here's some source of the ComCtrls.pas, that contain all the declartion of TDateTimePicker class

 TDateTimePicker = class(TCommonCalendar)
  private
    FCalAlignment: TDTCalAlignment;
    FChanging: Boolean;
    FChecked: Boolean;
..
..
  protected
    procedure CheckEmptyDate; override;
    procedure CreateParams(var Params: TCreateParams); override;
    procedure CreateWnd; override;
    procedure Change; dynamic;
..

Best regards
Mohammed
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dhertzfe
ID: 6353232
Hi Mohammed,

I'm using Delphi 6....and I did what you said in the designer on my form with the TDateTimePicker and I didn't see what you where talking about.

How would I write the code to override CheckEmptyDate method to not display the date unless there was a value entered by the user or read from a record?

Thanks,
Chad
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8735385
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To be PAQ/Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 8822594
Per recommendation,

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question