C
Chris Fairman
NG,
Maybe I'm missing a key step, but it seems when typing dates into a
DateTimePicker control (format = 'Short'), the controls' .text property is
not updated until the control losses focus.
I'm handling an <enter> key event on a DateTimePicker control.
Essentially I want to give a user the ability to type a date in the
DTP, and press <enter> and have a DataGrid populate with user
supplied data from the DTP control.
I can get the DataGrid to populate, but the DTP control isn't updated
with the key strokes supplied by the user, unless:
1. The control looses focus
2. You click into another field within the control itself. (If you were
changing the 'day' value of the control, clicking in the month or year
fields will update the 'day' value in the .text property.)
So...
If the DTP control reads [02/15/2005] and I click on the 15, type 20 and
press <enter> the .text value for the DTP control still reads 02/15/2005,
instead of 02/20/2005. Unless... (as stated above -control losses focus,
etc...)
I've recreated the DTP controls just in case, but getting the same
behavior.
I've tried invoking both .update() and .refresh() DTP methods
before reading in the .text value, but none of these methods are helping.
The .text value and the actual text of the DTP are never equivalent
(Unless -as stated above -control losses focus, etc...)
Hope all that made sense to somebody.
Thanks in Advance,
-Chris
Maybe I'm missing a key step, but it seems when typing dates into a
DateTimePicker control (format = 'Short'), the controls' .text property is
not updated until the control losses focus.
I'm handling an <enter> key event on a DateTimePicker control.
Essentially I want to give a user the ability to type a date in the
DTP, and press <enter> and have a DataGrid populate with user
supplied data from the DTP control.
I can get the DataGrid to populate, but the DTP control isn't updated
with the key strokes supplied by the user, unless:
1. The control looses focus
2. You click into another field within the control itself. (If you were
changing the 'day' value of the control, clicking in the month or year
fields will update the 'day' value in the .text property.)
So...
If the DTP control reads [02/15/2005] and I click on the 15, type 20 and
press <enter> the .text value for the DTP control still reads 02/15/2005,
instead of 02/20/2005. Unless... (as stated above -control losses focus,
etc...)
I've recreated the DTP controls just in case, but getting the same
behavior.
I've tried invoking both .update() and .refresh() DTP methods
before reading in the .text value, but none of these methods are helping.
The .text value and the actual text of the DTP are never equivalent
(Unless -as stated above -control losses focus, etc...)
Hope all that made sense to somebody.
Thanks in Advance,
-Chris