Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Bug in DateTimePicker

Posted on 1999-01-14
4
Medium Priority
?
478 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
[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
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 20 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

609 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