clevertech / YiiBooster

YiiBooster
BSD 2-Clause "Simplified" License
544 stars 305 forks source link

Can't Use locale and click on month/year #527

Closed ZenLiuCN closed 10 years ago

ZenLiuCN commented 11 years ago

There is a problem I just find

I use a CJuiDraggable in page and then the datepicker in search form changeback to english, and Month/Year can't be click.

codes

In layouts column2.php

$this->beginWidget('zii.widgets.jui.CJuiDraggable',array(
));

$this->widget('bootstrap.widgets.TbButtonGroup', array(
    'size'=>'small',
    //'htmlOptions' => array('class'=>'dropup'),
    'type'=>'info', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
    'buttons'=>array(
        array('label'=>'操作菜单', 'url'=>'#', 'icon'=>'icon-list-alt','items'=>$this->menu,)),
));

$this->endWidget();
?>
        </div><!-- sidebar -->
    </div>
    <div class="span11 well well-small">
        <div id="content">
            <?php echo $content; ?>
        </div><!-- content -->
    </div>

<?php $this->endContent(); ?>

in _search.php

    <?php echo $form->datepickerRow($model, 'birth_sun',
        array(
        'hint'=>'点击选择日期.',
        'prepend'=>'<i class="icon-calendar"></i>',
         'options'=>array( 'format'=>'yyyy-mm-dd', 'language'=>'zh-CN', )
        )); ?>

Maybe it's the same thing as #521

hijarian commented 11 years ago

Thanks for this finding.

Unfortunately, jQueryUI and Bootstrap has many incompatibilities, which original author of YiiBooster wanted to solve, but it all halted when he left. So, until it'll be resolved for sure, you should bear in mind that it's probably not a good idea (and can lead to problems like the one you've found) to include both built-in Yii widgets (which are jQueryUI-based) and YiiBooster ones.

Sorry about that. We're working on it.

digitalcrab commented 10 years ago

Hello @lcz20 now it is fine! My example: http://yii-demo.yukki.name/bootstrap/issue527 Thank you for your issue!