![]() |
Horizontal Calendar - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Horizontal Calendar (/showthread.php?tid=14171) |
Horizontal Calendar - El Forum - 12-21-2008 [eluser]Unknown[/eluser] I'm just starting with Codeigniter and would like to have a horizontal calendar. I have used a template to display each day of the month in a single row but I am having trouble with repeating the days of the week in a header. so far I have something like this.... Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ......... 31 using this template.... $prefs['template'] = ' {table_open}<table border="0" cellpadding="5" cellspacing="0">{/table_open} {heading_row_start}<tr>{/heading_row_start} {heading_previous_cell}<th><a href="{previous_url}"><<</a>th>{/heading_previous_cell} {heading_title_cell}<th colspan="{colspan}">{heading}</th>{/heading_title_cell} {heading_next_cell}<th><a href="{next_url}">>></a></th>{/heading_next_cell} {heading_row_end}</tr>{/heading_row_end} {week_row_start}<tr class="weekrow">{/week_row_start} {week_day_cell}<td class="weekday">{week_day}</td>{/week_day_cell} {week_row_end}</tr>{/week_row_end} {cal_row_start}{/cal_row_start} {cal_cell_start}<td>{/cal_cell_start} {cal_cell_content}<a href="{content}">{day}</a>{/cal_cell_content} {cal_cell_content_today}<div class="highlight"><a href="{content}">{day}</a></div>{/cal_cell_content_today} {cal_cell_no_content}{day}{/cal_cell_no_content} {cal_cell_no_content_today}<div class="highlight">{day}</div>{/cal_cell_no_content_today} {cal_cell_blank} {/cal_cell_blank} {cal_cell_end}</td>{/cal_cell_end} {cal_row_end}{/cal_row_end} {table_close}</table>{/table_close} Any recommendations? Horizontal Calendar - El Forum - 03-12-2010 [eluser]roguemonk[/eluser] [quote author="cnother" date="1229877521"]I'm just starting with Codeigniter and would like to have a horizontal calendar. I have used a template to display each day of the month in a single row but I am having trouble with repeating the days of the week in a header. so far I have something like this.... Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ......... 31 using this template.... $prefs['template'] = ' {table_open}<table border="0" cellpadding="5" cellspacing="0">{/table_open} {heading_row_start}<tr>{/heading_row_start} {heading_previous_cell}<th><a href="{previous_url}"><<</a>th>{/heading_previous_cell} {heading_title_cell}<th colspan="{colspan}">{heading}</th>{/heading_title_cell} {heading_next_cell}<th><a href="{next_url}">>></a></th>{/heading_next_cell} {heading_row_end}</tr>{/heading_row_end} {week_row_start}<tr class="weekrow">{/week_row_start} {week_day_cell}<td class="weekday">{week_day}</td>{/week_day_cell} {week_row_end}</tr>{/week_row_end} {cal_row_start}{/cal_row_start} {cal_cell_start}<td>{/cal_cell_start} {cal_cell_content}<a href="{content}">{day}</a>{/cal_cell_content} {cal_cell_content_today}<div class="highlight"><a href="{content}">{day}</a></div>{/cal_cell_content_today} {cal_cell_no_content}{day}{/cal_cell_no_content} {cal_cell_no_content_today}<div class="highlight">{day}</div>{/cal_cell_no_content_today} {cal_cell_blank} {/cal_cell_blank} {cal_cell_end}</td>{/cal_cell_end} {cal_row_end}{/cal_row_end} {table_close}</table>{/table_close} Any recommendations?[/quote] I realize this is a really old post, but since no-one's documented a solution, here's mine: Code: // Somewhere before your calendar prefs, get the first day of the month You could get fancier with the replacement. I've only just started playing with this. Let me know if it's unclear. --Dave |