Solved

Bug in DateTimePicker

Posted on 1999-01-14
4
471 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

12 Experts available now in Live!

Get 1:1 Help Now