{"id":56,"date":"2025-01-31T00:58:08","date_gmt":"2025-01-31T00:58:08","guid":{"rendered":"https:\/\/larodaja.com\/lamanga\/?page_id=56"},"modified":"2026-02-02T00:35:40","modified_gmt":"2026-02-02T00:35:40","slug":"reservar","status":"publish","type":"page","link":"https:\/\/larodaja.com\/lamanga\/reservar\/","title":{"rendered":"Reservar"},"content":{"rendered":"<style>  \n#pax:invalid {color:red; border: 2px dashed red;}\n#comida:invalid {color:red; border: 2px dashed red;}\n#cena:invalid {color:red; border: 2px dashed red;}\n<\/style>\n\n<div style=\"background: var(--white-color); -webkit-box-shadow: 0px 0px 30px 0px rgba(21, 21, 21, 0.1); -moz-box-shadow: 0px 0px 30px 0px rgba(21, 21, 21, 0.1); box-shadow: 0px 0px 30px 0px rgba(21, 21, 21, 0.1);\">\n<form action=\"https:\/\/larodaja.com\/lamanga\/mailbook.php\" method=\"POST\" name=\"frm\" accept-charset=\"utf-8\">\n<div style=\"padding: 5px;\"><input name=\"nombre\" required=\"\" size=\"40\" style=\"max-width:90vw;\" type=\"text\" placeholder=\"Nombre y Apellidos\" \/><\/div>\n<div style=\"padding: 5px;\"><input name=\"tel\" required=\"\" size=\"20\" type=\"tel\" placeholder=\"Tel\u00e9fono M\u00f3vil\" \/><\/div>\n<div style=\"padding: 5px;\"><input name=\"email\" size=\"50\" style=\"max-width:90vw;\" type=\"email\" placeholder=\"Email\" \/><\/div>\n<div style=\"padding: 5px;\"><label style=\"padding: 3px;\" for=\"pax\">Comensales:<\/label><input id=\"pax\" name=\"pax\" max=\"6\" min=\"2\" required=\"\" size=\"10\" type=\"number\" value=\"2\" \/><\/div>\n<div style=\"padding: 5px;\"><label style=\"padding: 3px;\" for=\"cal\">Fecha:<\/label><input id=\"cal\" name=\"fecha\" required=\"\" type=\"date\"\/><\/div>\n<div style=\"padding: 5px;\">\n <label for=\"hora\">Hora:<\/label>\n  <select name=\"hora\" id=\"hora\" required=\"\">\n    <optgroup label=\"Comida\" id=\"comida\">\n      <option value=\"13:30\">13:30<\/option>\n      <option value=\"14:00\">14:00<\/option>\n      <option value=\"14:30\">14:30<\/option>\n      <option value=\"15:00\">15:00<\/option>\n      <option value=\"15:30\">15:30<\/option>\n    <\/optgroup>\n    <optgroup label=\"Cena\" id=\"cena\">\n      <option value=\"20:30\">20:30<\/option>\n      <option value=\"21:00\">21:00<\/option>\n      <option value=\"21:30\">21:30<\/option>\n      <option value=\"22:00\">22:00<\/option>\n      <option value=\"22:30\">22:30<\/option>\n    <\/optgroup>\n  <\/select>\n<\/div>\n<div style=\"padding: 5px;\"><textarea class=\"mail\" cols=\"55\" style=\"max-width:90vw;\" name=\"nota\" rows=\"6\" placeholder=\"Consultas o Peticiones\"><\/textarea><\/div>\n<div class=\"col-lg-4\"><input class=\"submit\" name=\"acc\" type=\"submit\" value=\"Enviar\" width=\"20\" \/><\/div>\n<\/form><\/div>\n<script type=\"text\/javascript\">\nfunction formatDate(date) {\n    var d = new Date(date),\n        month = '' + (d.getMonth() + 1),\n        day = '' + d.getDate(),\n        year = d.getFullYear();\n\n    if (month.length < 2) \n        month = '0' + month;\n    if (day.length < 2) \n        day = '0' + day;\n\n    return [year, month, day].join('-');\n}\ncalen = document.getElementById(\"cal\");\ncomidaMin=13; \ncenaMin=20; \nfechaActual  = new Date();\nhoraActual = fechaActual.getHours();\ndiaSem = fechaActual.getDay();\nif (diaSem==5 || diaSem ==6){  \n  if (horaActual > cenaMin) \n\t\tfechaActual.setDate(fechaActual.getDate() + 1);\n}\nelse if (diaSem==0)  { \n\t\tif (horaActual > comidaMin)\n\t\tfechaActual.setDate(fechaActual.getDate() + 1);\n} \ncalen.min= formatDate(fechaActual); \ncomida= document.getElementById(\"comida\");\ncena = document.getElementById(\"cena\");\ncalen.onblur = function(){\nconst cerrado = [1,2,3,4];\nconst open = [5,6,0];\nfechaReserva=new Date(calen.value);\ndia=fechaReserva.getDay();\nif (dia == 5) {comida.disabled=true;\ncena.disabled=false;}\nelse if (dia == 0) {comida.disabled=false;\ncena.disabled=true;}\nelse if (dia==6) {\n  comida.disabled=false;\n  cena.disabled=false;\n if (fechaReserva==fechaActual){\n  if (horaActual > comidaMin)\n     comida.disabled=true;\n  } \n}\nelse if (cerrado.includes(dia))\n{comida.disabled=true;\ncena.disabled=true;\nalert(\"Salvo excepciones, abierto solo en fin de semana.\\n Int\u00e9ntelo en el tel\u00e9fono: 688 901 544\");\n\/\/calen.focus();\n}\n}\n\/*function evalDia(diaSel){\nvar ahora=nao.toLocaleTimeString();\nif (ahora < tiempo -1)\n}*\/\n\n<\/script>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Comensales: Fecha: Hora: 13:3014:0014:3015:0015:30 20:3021:0021:3022:0022:30<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-56","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/pages\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":140,"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/pages\/56\/revisions"}],"predecessor-version":[{"id":300,"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/pages\/56\/revisions\/300"}],"wp:attachment":[{"href":"https:\/\/larodaja.com\/lamanga\/wp-json\/wp\/v2\/media?parent=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}