开发者

JQuery Datepicker in Zend Framework not showing correctly

I made a form, which extends from Zend_Form, where I added a ZendX_JQuery_Form_Element_Datepicker as you can see in this picture:

JQuery Datepicker in Zend Framework not showing correctly

But when I view that page i开发者_Python百科n the browser, the datepicker seems to work, but the layout is messed up. See this picture:

JQuery Datepicker in Zend Framework not showing correctly

You can see that the datepicker is too small and the prev/next buttons are not shown correctly. I've tried fixing this with css:

.ui-datepicker-div { width: 200px; } 
.ui-datepicker-calendar { width: 200px; }

This helps a little, as you can see in this picture:

JQuery Datepicker in Zend Framework not showing correctly

But as you can see, there's still a problem with the prev/next buttons. How I can I fix this?

Update: I fixed my problem by including another css file. Because I was using the Google CDN for jQuery and jQuery UI, I had to use the CDN also for including the css. So, by adding the following line, I solved my problem:

$this->jQuery()->addStyleSheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.7/themes/smoothness/jquery-ui.css');


You have some external CSS interfering, something affecting all table cells most likely, possibly <div> and <a> elements as well. Without a link to the actual page I can't say...but it's definitely a CSS issue, where your styles are overriding the padding/margins jQuery UI sets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜