CodeIgniter Forums
Move next and previous buttons in calendar? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Move next and previous buttons in calendar? (/thread-43880.html)

Pages: 1 2


Move next and previous buttons in calendar? - El Forum - 07-26-2011

[eluser]philfishbein[/eluser]
Hi, I'm using the CodeIgniter calendar library and, rather than on either side of the month, I'd like to previous and next buttons to be on one side next to each other. Is this possible?


Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]toopay[/eluser]
Read more : Creating a Calendar Template


Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]philfishbein[/eluser]
I created a template and moved the buttons but that change will not reflect in the HTML.


Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]toymachiner62[/eluser]
Are you sure you are passing the new template? See example from the user guide.

Code:
$prefs['template'] = your template here;

$this->load->library('calendar', $prefs);

echo $this->calendar->generate();



Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]philfishbein[/eluser]
All other template elements are working. Here's the code for the buttons:

Code:
{heading_title_cell}{heading}{/heading_title_cell}
{heading_previous_cell}<a href="{previous_url}"><img src="/images/previous.gif" /></a>{/heading_previous_cell}
{heading_next_cell}<a href="{next_url}"><img src="/images/next.gif" /></a></h3></div>{/heading_next_cell}



Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]toymachiner62[/eluser]
Why don't you have it in a table format? ie you don't have any td tags. What are you actually seeing for a result?


Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]philfishbein[/eluser]
It looks totally fine. Attached is a screenshot.


Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]toymachiner62[/eluser]
What does the generated html output look like for the table heading?


Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]philfishbein[/eluser]
Code:
<div id="month"><h3>
<a href="http://schedulizerapp.com/calendar/show/2011/06"><img src="/images/previous.gif" /></a>
July&nbsp;2011
<a href="http://schedulizerapp.com/calendar/show/2011/08"><img src="/images/next.gif" /></a></h3></div>


<div id="content">
<div class="day-of-week">Sunday</div><div class="day-of-week">Monday</div><div class="day-of-week">Tuesday</div><div class="day-of-week">Wednesday</div><div class="day-of-week">Thursday</div><div class="day-of-week">Friday</div><div class="day-of-week">Saturday</div>



<div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day">1<a href="/addevent.php?step=1&day=1&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">2<a href="/addevent.php?step=1&day=2&month=07"><img src="/images/add-event.gif" class="add-event"></a></div>



<div class="day">3<a href="/addevent.php?step=1&day=3&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">4<a href="/addevent.php?step=1&day=4&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">5<a href="/addevent.php?step=1&day=5&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">6<a href="/addevent.php?step=1&day=6&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">7<a href="/addevent.php?step=1&day=7&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">8<a href="/addevent.php?step=1&day=8&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">9<a href="/addevent.php?step=1&day=9&month=07"><img src="/images/add-event.gif" class="add-event"></a></div>



<div class="day">10<a href="/addevent.php?step=1&day=10&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">11<a href="/addevent.php?step=1&day=11&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">12<a href="/addevent.php?step=1&day=12&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">13<a href="/addevent.php?step=1&day=13&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">14<a href="/addevent.php?step=1&day=14&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">15<a href="/addevent.php?step=1&day=15&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">16<a href="/addevent.php?step=1&day=16&month=07"><img src="/images/add-event.gif" class="add-event"></a></div>



<div class="day">17<a href="/addevent.php?step=1&day=17&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">18<a href="/addevent.php?step=1&day=18&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">19<a href="/addevent.php?step=1&day=19&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">20<a href="/addevent.php?step=1&day=20&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">21<a href="/addevent.php?step=1&day=21&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">22<a href="/addevent.php?step=1&day=22&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">23<a href="/addevent.php?step=1&day=23&month=07"><img src="/images/add-event.gif" class="add-event"></a></div>



<div class="day">24<a href="/addevent.php?step=1&day=24&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">25<a href="/addevent.php?step=1&day=25&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">26<a href="/addevent.php?step=1&day=26&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day"><span style="color:#a11717">27</span><span class="today">today</span><a href="/addevent.php?step=1&day=27&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">28<a href="/addevent.php?step=1&day=28&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">29<a href="/addevent.php?step=1&day=29&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day">30<a href="/addevent.php?step=1&day=30&month=07"><img src="/images/add-event.gif" class="add-event"></a></div>



<div class="day">31<a href="/addevent.php?step=1&day=31&month=07"><img src="/images/add-event.gif" class="add-event"></a></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div><div class="day"><span class="light"></light></div>


</div>



Move next and previous buttons in calendar? - El Forum - 07-27-2011

[eluser]toymachiner62[/eluser]
Interesting...Maybe try wrapping div's around the next/prev/month cells and then use css to float them. It could be because the calendar was intended to use a table, but i'm not sure.