Club Builder - Foros de discusión Club Builder
Foro de C++Builder en español
 
 FAQFAQ   BuscarBuscar   MiembrosMiembros   Grupos de UsuariosGrupos de Usuarios   RegistrarseRegistrarse 
 PerfilPerfil   Entra para ver tus mensajes privadosEntra para ver tus mensajes privados   EntrarEntrar 

TDateTimePicker

 
Publicar nuevo tema   Responder al tema    Foros de discusión -> Consultas
Ver tema anterior :: Ver tema siguiente  
Autor Mensaje
Mensaje    Asunto: TDateTimePicker Responder citando

Uso un componente TDateTimePicker para introducir horas en un formulario. Una vez lo tengo en modo Time , para poder visualizar la hora:minutos:segundos todo va correcto excepto porque al intentar poner 0:12:00 por ejemplo me salta un mensaje de error.


Código:

EDateTimeError
You Must be in ShowCheckBox mode to set this date


No entiendo el porque habla de date si el tipo es Time , pero en definitiva lo que me gustaria es poder evitar el mensaje sin tener que tener el checkbox al lado. Gracias.
Volver arriba
Ver perfil de usuario Enviar mensaje privado
Mensaje    Asunto: Responder citando

Hola:

Ya verificaste que en la propiedad Format tienes hh:mm:ss tt.

hh horas
mm minutos
ss segundos
tt AM/PM

Apoyandome de esto y aparte con la propiedad Kind= dtkTime no me permitio escribir una hora parecida a la tuya. El primer cero que escribes lo transforma en 12 por que las horas nadamas llegan hasta 12 o si escribes en el formato HH (mayusculas) puedes utilizar 24 horas.

Aqui te mando la propiedad format para TDateTimePicker

Specify format for date-time string.

__property AnsiString Format = {read=FFormat, write=SetFormat};

Description

Format specifies custom format string for the date-time display, overriding the control panel strings. A custom format can include both date and time fields, but time fields are not editable unless the Kind property is dtkTime. The following format characters are understood.

Element Description
d The one- or two-digit day.
dd The two-digit day. Single-digit day values are preceded by a zero.
ddd The three-character weekday abbreviation.
dddd The full weekday name.
h The one- or two-digit hour in 12-hour format.
hh The two-digit hour in 12-hour format. Single-digit values are preceded by a zero.
H The one- or two-digit hour in 24-hour format.
HH The two-digit hour in 24-hour format. Single-digit values are preceded by a zero.

m The one- or two-digit minute.
mm The two-digit minute. Single-digit values are preceded by a zero.
M The one- or two-digit month number.
MM The two-digit month number. Single-digit values are preceded by a zero.
MMM The three-character month abbreviation.
MMMM The full month name.
t The one-letter AM/PM abbreviation (that is, AM is displayed as "A").
tt The two-letter AM/PM abbreviation (that is, AM is displayed as "AM").
yy The last two digits of the year (that is, 2001 would be displayed as "01").

yyyy The full year (that is, 2001 would be displayed as "2001").
_________________
Regards.
Volver arriba
Ver perfil de usuario Enviar mensaje privado
Mostrar mensajes de anteriores:   
Cambiar a:  
No puedes publicar temas nuevos en este foro
No puedes responder a temas en este foro
No puedes editar tus mensajes en este foro
No puedes borrar tus mensajes en este foro
No puedes votar en las encuestas de este foro


Hosting WordPress Indedmedia desde 3,99 €
© 2002–2026 Club Builder · Funciona con phpBB.