tDateTimePicker is a PITA

Giganews Newsgroups
Subject:tDateTimePicker is a PITA
Posted by: Keith Latham
Date:Sun, 10 Aug 2008

I'm using D2006 on a Vista machine. (I know, pity me on both cases).

I am fighting the infamous "display blank when zero" in a tDateTimePicker and I can get that part to work. Sort of.

1) At Form initialization time, I set the tDateTimePicker.datetime to 0 and the tDateTimePicker.format to 'gg' (as described by many other posts across the web). This successfully displays blanks in the tDateTimePicker's edit field.

2) When a data record is selected, and I set the tDateTimePicker's datetime to that of the database record.

==> I 'expect' the ONCHANGE event to fire, where I clear the format to cause the date to be displayed. *This is NOT happening*. Nor is any other event that I can figure out.

3) ONCHANGE does fire when a date is picked by user input, the format gets cleared, and the date displayes properly.

How do I get it to fire when the date is changed by the program?

Replies