?
Solved

Bug in DateTimePicker

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

800 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