-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTablaInterFecha.php
More file actions
65 lines (44 loc) · 1.88 KB
/
TablaInterFecha.php
File metadata and controls
65 lines (44 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<header>
</header>
<body>
<script>
//funciòn para la validacion de la fecha donde la fecha de desde no puede ser mayor que la fecha hasta
function validar() {
var inicio = document.getElementById('Inicio').value;
var finalq = document.getElementById('Fin').value;
document.cookie ='VarCookieInicio='+inicio+';';
document.cookie ='VarCookieFinalq='+finalq+';';
//document.cookie ='variable='+data+'; expires=Thu, 2 Aug 2021 20:47:11 UTC; path=/'; cooki con fecha de expiraciòn
inicio= new Date(inicio);
finalq= new Date(finalq);
if(inicio>finalq)
{
alert('La fecha Desde no puede ser mayor que la fecha Hasta verifique sus fechas');
}
}
</script>
<form name='tabla.php' method="POST" class="formulario" onkeypress="validar()" onchange="validar();" >
<TABLE cellspacing=0 cellpadding=0><!--Creacion de la tabla busqueda para dar un mejor ambiente de busqueda-->
<TR><TD>
<TABLE cellspacing=0 cellpadding=0><!--mension al tamaño de tabla de busqueda-->
<center><legend><h4>Búsqueda por intervalo de fechas</h4></legend></center>
<tr>
<!--datapicker para el calendario en pantalla-->
<label>Desde que fecha:</label>
<!--Calendario de fecha desde-->
<input type="date" name="Inicio" id="Inicio" step="1" required/>
<!--Calendario de fecha hasta-->
<label> Hasta que fecha:</label>
<input type="date" name="Fin" step="1" id="Fin" required/>
<center><input type="submit" name="btnConsulta" value="Consultar" />
<input type="reset" name="btnRest" value="Borrar"/></center>
</tr>
</TABLE>
</TD></TR>
</TABLE>
</form>
</body>
</html>