I am new in smarty template I have added calendar, I just want to pass the date of calendar to other page.
For example:
When a user clicks on the 24-12-2012 date then I need a url like in this format:
`eventpost.php?ed=24-12-2012``
I have calendar.tpl file:
$('#calendar').fullCalendar({
dayClick: function (date, allDay, jsEvent, view) {
var myJsDate = date;
var dispDate = myJsDate.getDate() + '-' + (myJsDate.getMonth() + 1) + '-' + myJsDate.getFullYear(); // 24-12-2012
var det = dispDate
$("#currentDate").val(dispDate);
$('#offDayPopUp').dialog({
autoOpen: true,
modal: true,
resizable: false,
width: 300,
height: 180,
draggable: false
});
$('#calmonth_' + myJsDate.getMonth()).addClass('cal_month_active');
},
HTML:
<div id="offDayPopUp" class="offDayDialog" title="Create Event,Commitment,Visiting Area.">
<div class="CrateDiv">
<div style="float:left; padding-right:10px;"><b>Date :</b></div>
<div><input type="text" name="currentDate" id="currentDate" readonly="readonly" /></div>
<ul>
<li><a href="{$cfgRoot}/event/eventPost.php"><b>Create A New Event.</b></a></li>
<li><a href="{$cfgRoot}/commitment/commitment.php"><b>Create A New Commitment.</b></a></li>
<li><a href="{$cfgRoot}/area/areaPost.php"><b>Create A New Visiting Area.</b></a></li>
</ul>
</div>
</div>
I just want to pass that date from JavaScript to url like:
eventPost.php?ed=24-12-2012
commitment.php?ed=24-12-2012
areaPost.php?ed=24-12-2012