Yii 的 CJuiDatePicker 对我不起作用
我复制了 CJuiDatePicker
的 Yii 文档示例: <代码>
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name'=>'publishDate',
// additional javascript options for the date picker plugin
'options'=>array(
'showAnim'=>'fold',
),
'htmlOptions'=>array(
'style'=>'height:20px;'
),
));
表单字段已呈现,但当我单击它时没有任何反应,也没有显示日历。 我错过了什么吗?我是否必须手动包含 JQuery,或设置一些 javascript 回调或除上面示例之外的其他内容?
I copied the Yii documentation's example for CJuiDatePicker
:
$this->widget('zii.widgets.jui.CJuiDatePicker', array( 'name'=>'publishDate', // additional javascript options for the date picker plugin 'options'=>array( 'showAnim'=>'fold', ), 'htmlOptions'=>array( 'style'=>'height:20px;' ), ));
The form field is rendered, but when I click it nothing happens, no calendar is displayed.
Am I missing something? do I have to manually include JQuery, or set some javascript callbacks or anything else than the example above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当相应的 CSS 文件丢失时,我也遇到了同样的情况。日历确实出现了,尽管远远超出了窗口的边界。
I experienced the same when the corresponding CSS file was missing. The calendar did appear although far beyond the boundaries of the window.
抱歉,是我的错。
有一个 .htaccess 拒绝所有,阻止页面从 /assets 目录加载 Jquery 文件。
无论如何,谢谢!
Sorry, my fault.
There was a .htaccess with deny from all, preventing the page from loading the Jquery files from the /assets dir.
Thanks anyway!