Comunque visto che ci siamo ne approfitto, sempre se sei disponibile.
Ora il prossimo step è quello di modificare il formato grafico del calendario per visualizzare i giorni contenuti nel mese scelto (28,29,30 o 31) e posizionarli sotto i relativi giorni, ti posto il codice completo, ci ho provato ma ancora ho serie lacune che colmerò mano a mano con gli esempi che vado a sviluppare:
codice:
<script type="text/javascript" >
function visible() {
var dx = document.getElementById('prova');
var wWidth = window.innerWidth;
var wHeight = window.innerHeight;
var xPos = (wWidth - (dx.style.width.split('px')[0])) / 2;
var yPos = (wHeight - (dx.style.height.split('px')[0])) / 2;
dx.style.top = Math.round(yPos) + 'px';
dx.style.left = Math.round(xPos) + 'px';
document.getElementById('prova').style.visibility = 'visible'
window.onresize = centerLayer;
}
function invisible() {
//alert("Prova di invisibilità");
document.getElementById('prova').style.visibility = 'hidden'
}
function addLoadEvent(func) {
document.getElementById('prova').style.visibility = 'hidden'
}
var aMonths = ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"];
function increaseMonth(nDelta) {
var oDisplay = document.getElementById("mese"), nThisMonth = aMonths.indexOf(oDisplay.value);
if (nThisMonth > -1) { oDisplay.value = aMonths[(nThisMonth + nDelta + 24) % 12]; }
}
function getMonthName(nMonth) {
return aMonths[nMonth];
}
function getMonthNumber(sMonth) {
return aMonths.indexOf(sMonth) + 1;
}
function GiornoSettimana() {
alert(document.getElementById('Giorno').valueOf);
}
</script>
codice:
<div style="width:250px; visibility:hidden; height:250px; position:absolute; background-color:Gray; border:5px solid black; color:White" id="prova">
<table style="background-color:White; color:Black ">
<tr>
<td>
<table><tr>
<td style="font-size:10px">giorno
<asp:TextBox ID="giorno" Width="30" align="center" runat="server"></asp:TextBox></td>
<td width="5"></td>
<td>-</td>
<td style="font-size:10px">Mese
<asp:TextBox ID="mese" Width="70" align="center" runat="server"></asp:TextBox></td>
<td>+</td>
<td width="5"></td>
<td style="font-size:10px">Anno
<asp:TextBox ID="anno" Width="40" align="center" runat="server"></asp:TextBox></td>
<td>giorno</td>
</tr></table>
</td>
</tr>
<tr><td>
<table>
<tr><td>L</td><td>M</td><td>M</td><td>G</td><td>V</td><td>S</td><td>D</td></tr>
<%Dim Giorni As Integer = 31, z As Integer = 0%>
<%For x = 1 To Giorni
z = z + 1
If z = 8 Then z = 1
%>
<%If z = 1 Then%><tr><%End If%>
<td width="20">
"><%=x%>
</td>
<%If z = 7 Or x = Giorni Then%></tr><%End If%>
<%Next%>
</table>
</td></tr>
</table>
inVisibile
</div>