Solved

Null Value In DateTmePicker

Posted on 2001-08-03
6
166 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
6 Comments
 
LVL 22

Expert Comment

by:mnasman
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:mnasman
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now