Solved

Null Value In DateTmePicker

Posted on 2001-08-03
6
172 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: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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing problem 2 80
select query - oracle 16 94
Find and Replace Stream with 0s 8 57
TEMBEDDEDWB how can i change its user agent ? 8 48
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

20 Experts available now in Live!

Get 1:1 Help Now