Yii Booster 日期选择器无法正常工作 [英] Yii Booster datepicker not working correctly

查看:41
本文介绍了Yii Booster 日期选择器无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与 Yii booster datepicker 相关的问题.

I have an issue which related to Yii booster datepicker.

场景:

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
'id'=>'expend-form',
'enableAjaxValidation'=>false,
'type'=>'horizontal',   )); ?>

<p class="help-block">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>

<?php // echo $form->textFieldRow($model,'fecha',array('class'=>'span5')); 
    echo $form->datepickerRow($model, 'fecha',
            array('prepend'=>'<i class="icon-calendar"></i>' 
                    , 'options'=>array( 'format' => 'dd/mm/yyyy', 
                                        'weekStart'=> 1,
                                        'showButtonPanel' => true,
                                        'showAnim'=>'fold',)
            )
        );

?>

问题是:

选项:

'showButtonPanel' => true,
'showAnim'=>'fold',

不工作.

CSS 有问题(查看屏幕截图)

and the CSS have something wrong (check the screenshot)

有什么想法吗?

谢谢

推荐答案

@Nathanphan,你的 CSS 有问题的原因是 Yii css 文件覆盖了 YiiBooster CSS.打开/protected/views/layouts 下的 main.php 布局文件并删除以下行.您可能想要删除所有 CSS 链接.

@Nathanphan, the reason your CSS has something wrong is because the Yii css files are overriding the YiiBooster CSS. Open your main.php layout file under /protected/views/layouts and delete the following line. You may want to delete all of the CSS links.

<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />

您应该发现您的 YiiBooster 小部件现在可以正常显示了;然而,您网站上的一些 Yii 小部件现在可能看起来不正确.您可以将 Yii 小部件转换为等效的 YiiBooster 小部件,然后一切都会好起来的.

You should find that your YiiBooster widgets appear properly now; however some of the Yii widgets on your site may now look incorrect. You can convert your Yii widgets to equivalent YiiBooster widgets and then everything should be fine.

我还没有找到同时运行 Yii blueprint CSS 和 YiiBooster 的方法.

I've not found a way to run the Yii blueprint CSS and YiiBooster at the same time.

这篇关于Yii Booster 日期选择器无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆