· 9 years ago · Dec 03, 2016, 11:22 PM
1CREATE TABLE if not exists reservas(
2
3id_reserva integer(20) NOT NULL AUTO_INCREMENT,
4id_cliente integer,
5id_residencial integer(20),
6id_habitacion integer(20),
7llegada date,
8salida date,
9PRIMARY KEY (id_reserva),
10FOREIGN KEY (id_cliente) REFERENCES clientes(id_cliente),
11FOREIGN KEY (id_residencial) REFERENCES residenciales(id_residencial),
12FOREIGN KEY (id_habitacion) REFERENCES habitaciones(id_habitacion)
13) ENGINE=InnoDB;
14
15<input style="height: 31px;" id="datepicker2" class="form-control" name="llegada" >
16
17<input style="height: 31px;" id="datepicker3" class="form-control" name="salida">
18
19<script>
20$(function() {
21var eventDates = {};
22 eventDates[ new Date( '12/04/2016' )] = new Date( '12/05/2016' );
23 eventDates[ new Date( '12/06/2016' )] = new Date( '12/06/2016' );
24 eventDates[ new Date( '12/20/2016' )] = new Date( '12/20/2016' );
25 eventDates[ new Date( '12/25/2016' )] = new Date( '12/25/2016' );
26
27 $( "#datepicker3" ).datepicker({
28 numberOfMonths:[2,2],
29 showButtonPanel: true,
30 firstDay: 1,
31 beforeShowDay: function( date ) {
32 var highlight = eventDates[date];
33 if( highlight ) {
34 return [true, "event", "highlight"];
35 } else {
36 return [true, '', ''];
37 }
38 }
39 });
40
41 });
42</script>
43
44<style type="text/css">
45.event a {
46 background-color: rgba(244, 67, 54, 0.45) !important;
47 background-image :none !important;
48 color: #ffffff !important;
49}
50</style>
51
52eventDates[ new Date( '12/04/2016' )] = new Date( '12/05/2016' );
53 eventDates[ new Date( '12/06/2016' )] = new Date( '12/06/2016' );
54 eventDates[ new Date( '12/20/2016' )] = new Date( '12/20/2016' );
55 eventDates[ new Date( '12/25/2016' )] = new Date( '12/25/2016' );