Ver Mensaje Individual
  #2  
Antiguo 27-11-2003
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
Pues yo hago la prueba y es cierto, que me deja introducir lo que quiera pero cuando abandono el control restaura la fecha del día y no me reporta ningún error.

TDateTimePicker.OnUserInput

Lo cierto es que este evento es el que se habilita al ponerlo a True,
Cita:
Occurs when the user types directly into the component’s edit box.

type TDTParseInputEvent = procedure(Sender: TObject; const UserString: string; var DateAndTime: TDateTime; var AllowChange: Boolean) of object;
property OnUserInput: TDTParseInputEvent;

Description

This event occurs only if ParseInput is set to True. Write an OnUserInput event handler implement special processing that needs to occur when the user types directly into the TDateTimePicker (rather than selecting with the drop-down calendar or scroll arrows). UserString is the string that the user types, and DateAndTime represents the value of the Date or Time property.
Por lo tanto si es que te reporta errores no tendrias más que interceptar este evento y poner el código de comprobación apropiado.

Incluso el evento OnChange u OnKeyPress para controlar el tipo de caracteres que se introduce.

Un Saludo.
__________________
Guía de Estilo de los Foros
Cita:
- Ça c'est la caisse. Le mouton que tu veux est dedans.
Responder Con Cita