Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/08/2009, 14:11
skel363
 
Fecha de Ingreso: febrero-2003
Ubicación: chile
Mensajes: 101
Antigüedad: 22 años
Puntos: 1
Respuesta: TextBox personalizado para fechas c#

prueva con esta funcion JavaScript
Código:
function FormataDataHora(Obj)
{
	if(Obj.value.length == 2 || Obj.value.length == 5)
	{
		Obj.value = Obj.value + "/"
	}
	if(Obj.value.length == 10)
	{
		Obj.value = Obj.value + " "
	}
	if(Obj.value.length == 13 || Obj.value.length == 16)
	{
		Obj.value = Obj.value + ":"
	}
}
y en el textbox pon esto
Código:
 <asp:TextBox ID="txtIncidentOcurrence" runat="server" MaxLength="19" 
                            onkeypress="FormataDataHora(this); SoloNumeros()"></asp:TextBox>
__________________
s[K]eL