开发者

JQuery Datepicker in Zend Framework not showing correctly

开发者 https://www.devze.com 2023-01-21 23:14 出处:网络
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:

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

精彩评论

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

关注公众号