我在一個頁面中使用多個UI主題。我使用css
範圍創建自定義主題,可以說#scope
。我使用範圍內的日期選擇器字段可以說#scope input#datepicker
。 datepicker字段不會從UI主題獲取css
樣式。我想這是因爲它是#scope
以外的動態創建的,我該如何改變它,以及如何使它從範圍內獲取樣式。jQuery的日期選擇器出css範圍
6
A
回答
4
我解決了這個問題,在代碼中添加了一個wrapper div。
$(document).ready(function(){
$("#ui-datepicker-div").wrap('<div class="ui-layout-center" />');
});
0
我記得有同樣的問題,檢查一般定義的樣式如span
,它可能與ui
樣式重疊。
2
@bkilinc,你是對的。 datepicker日曆附加到document.body之後,並且位於自定義範圍之外。
http://bugs.jqueryui.com/ticket/4591 http://bugs.jqueryui.com/ticket/4306
在類似下面的結構中,日曆是容器的範圍之外。
<style type="text/css">
.calendarContainer .ui-datepicker {
/* rule intended to affect only .calendarContainer */
}
</style>
...
<body>
<div class="calendarContainer"><input name="date"/></div>
<div class="ui-datepicker"> (generated calendar)</div>
</body>
相關問題
- 1. 需要突出日期的jQuery日期選擇器的範圍
- 2. jQuery日期選擇器,選擇範圍內的特定日期
- 3. jQuery UI日期選擇器範圍
- 4. 我的日期選擇器jquery它的css範圍外
- 5. 日期選擇器日期範圍
- 6. 與Google Analytics日期範圍選擇器類似的日期範圍選擇器?
- 7. Jquery UI日期選擇器與預訂日期(日期範圍)
- 8. jQuery提示'時間範圍'(日期範圍選擇器)
- 9. jQuery UI日期選擇器範圍選擇器問題
- 10. PHP MYSQL日期範圍jQuery的日期選擇器
- 11. jQuery的日期選擇器禁用日期 - 多範圍
- 12. jQuery UI的日期選擇範圍
- 13. 日期範圍選擇器 - 24小時範圍選擇
- 14. 日期範圍下拉JQuery UI日期選擇器
- 15. jQuery UI日期選擇器日期範圍限制3個月
- 16. jquery日期選擇器顯示超出頁面範圍
- 17. 設置一個jQuery日期選擇器來選擇特定的日期範圍
- 18. 帶日期範圍選擇器的Fullcalendar
- 19. jQuery UI 2日期選擇器和範圍選擇
- 20. MYSQL - 選擇日期範圍時出錯
- 21. 選擇日期範圍
- 22. 選擇日期範圍
- 23. 日期範圍選擇
- 24. Highstocks更新日期範圍選擇器
- 25. 日期範圍選擇器 - IsInvalidDate/IsCustomDate
- 26. 日期和時間範圍選擇器
- 27. 日期範圍選擇器默認值
- 28. 帶日期範圍的jQuery UI日期選擇器,從當前日期開始
- 29. 引導日期選擇器日期範圍和默認日期
- 30. 無法從jquery datepicker日期範圍選擇器中選擇一個日期範圍在Selenium JAVA
只是爲了澄清「UI佈局中心」是您的自定義CSS類,是嗎?我個人儘量避免使用與其他jQuery UI中使用的ui-前綴相同的ui-前綴,以避免未來版本中可能的名稱衝突。 – 2013-08-28 01:34:08