Solved

Bug in DateTimePicker

Posted on 1999-01-14
4
472 Views
Last Modified: 2008-01-09
I am using Delphi 3 Professional

I am getting an error with DateTimePicker

When you enter a single digit in the year section
you will get a stackoverflow error.

example

01/14/01
            ^
             |
     i entered a 1 in this year section from my
    numerica keypad and then i closed my program
   and boooom got an overflow error.

anybody know why?

thanks
0
Comment
Question by:waipahu
4 Comments
 
LVL 5

Expert Comment

by:heathprovost
ID: 1356677
I am not positive, but looking at the code it looks like a bug in the control itself, not the VCL wrapper.  It only occurs if you dont type the 0 in before the 1 (or anything else for that matter).  Still trying to figure it out.  Just want you to know someone is working on it.

Heath
0
 

Author Comment

by:waipahu
ID: 1356678
Can you force users to use the pull-down calender instead of typing in the date?
I tried to look for a way, but found nothing to do that.

0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1356679
There is a known Y2K bug with the TDateTimePicker that is fixed in an update to the common controls dll (comctl32.sdll) on microsoft.com. Perhaps it fixes this bug as well...

Cheers,

Raymond..
0
 
LVL 3

Accepted Solution

by:
williams2 earned 10 total points
ID: 1356680
The TDateTimePicker uses the global variables know in SysUtils to set the time properties, that's why I do not have this problem.

If you use the ShortDateFormat and LongDateFormat global variables, you can try match "yy" and then replace it with  "yyyy".

There is still a bug though setting the MinDate property to the current value, where an error is raised with a message like "Dato is below 1/1 1899".

Regards,
Williams
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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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