Categories | Question details Back To List | ||
Send Calendar Text input in php form via POST methid Hi, i'm tryng to create a php or html form with also a calendar selection.. i've made all with input text calendar sample...but i'm bot able to send date value selected via POST method... Could u pls tell to me if it can be possible? Here is ny code... <p> <label>Data Inizio: <input type="text" id="calInput1" class="css1" readonly="true" value='Seleziona la Data di Inizio' name='from_date'> </label> </p> <p> <label>Data Fine: <input type="text" id="calInput2" class="css1" readonly="true" value='Seleziona la Data di Fine' name='to_date'> </label> </p> ....etc etc etc and: <!-- Creazione Calendario Grafico --> <script defer="defer" type="text/javascript"> mCal = new dhtmlxCalendarObject("calInput1", true, {isYearEditable:true,isMonthEditable:true,isWinHeader:true,headerButtons: "XMT",isWinDrag:true}); mCal.draw(); mCal.setSkin("vista"); mCal.attachEvent("onClick",mSelectDate1); function mSelectDate1(date) { alert(mCal2.getFormatedDate("%d.%m.%Y", date)) window.location = "index2.php?date="+mCal.getFormatedDate("%Y-%m-%d", date) } mCal2 = new dhtmlxCalendarObject("calInput2", true, {isYearEditable:true,isMonthEditable:true,isWinHeader:true,headerButtons: "XMT",isWinDrag:true}); mCal2.draw(); mCal2.setSkin("vista"); mCal2.attachEvent("onClick",mSelectDate2); function mSelectDate2(date) { alert(mCal2.getFormatedDate("%d.%m.%Y", date)) window.location = "index2.php?date="+mCal2.getFormatedDate("%Y-%m-%d", date) } </script> <!-- Fine Creazione Calendario Grafico --> In this case just after date selection in first calendar the page are reloaded with the link in mSekectDate function Answer posted by Alex (support) on Oct 23, 2009 01:31 Hello, you can try use html form with method="POST". |