2

我正在使用 code-igniter 构建一个 Web 应用程序,我在自定义日历模板时遇到了问题。我使用 code-igniter 的日历库构建日历

在此处输入图像描述

现在我想更改模板,以便那天应该列出如下


1

2

3

.. ETC

而不是


1 2 3


4 5 6


谁能告诉我怎么做

4

1 回答 1

0

取自:http ://ellislab.com/codeigniter/user-guide/libraries/calendar.html

通过创建日历模板,您可以 100% 控制日历的设计。日历的每个组件都将放置在一对伪变量中,如下所示:

$prefs['模板'] = '

{table_open}{/table_open}

{heading_row_start}{/heading_row_start}

{heading_previous_cell}<<{/heading_previous_cell}
{heading_title_cell}{heading}{/heading_title_cell}
{heading_next_cell}>>{/heading_next_cell}

{heading_row_end}{/heading_row_end}

{week_row_start}{/week_row_start}
{week_day_cell}{week_day}{/week_day_cell}
{week_row_end}{/week_row_end}

{cal_row_start}{/cal_row_start}
{cal_cell_start}{/cal_cell_start}

{cal_cell_content}{day}{/cal_cell_content} {cal_cell_content_today}{day}{/cal_cell_content_today}

{cal_cell_no_content}{day}{/cal_cell_no_content}
{cal_cell_no_content_today}{day}{/cal_cell_no_content_today}

{cal_cell_blank} {/cal_cell_blank}

{cal_cell_end}{/cal_cell_end}
{cal_row_end}{/cal_row_end}

{table_close}{/table_close} ';

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

回声 $this->日历->generate();

所以你必须使用不同的 HTML 和/或 CSS 来改变你的设计。

于 2013-01-23T10:26:26.410 回答