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
Solved

Bug in DateTimePicker

Posted on 1999-01-14
4
474 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Downloading email attachments 2 79
select query - oracle 16 100
enhance the following code 3 37
Twebbrowser add css to the header 3 27
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…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

840 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