2016-09-18 42 views
0

我試圖使用jQuery UI Timepicker,但用引導程序進入它,這取消了配置css​​。不要干擾jQuery UI中的Bootstrap css TimePicker

任何人都知道如何解決這個問題,因爲我需要bootstrap,但它不能干擾css TimePicker。

遵循應用於Jsfiddle

的引導代碼:

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css

+0

您是否嘗試過使用時間選擇器這是與自舉明確兼容?這可能比嘗試讓你選擇的時間選擇器工作好一點。 http://weareoutman.github.io/clockpicker/ –

+0

我搜索了幾個,但沒有一個與'jQuery UI Timepicker'相同的佈局。你知道一些相同的佈局? – rafaelcb21

回答

1

你就不能更改timepicker的類名?更改timepicker測試類timepicker

.ui-widget { font-size: 12px; } 

/* 
* Timepicker stylesheet 
* Highly inspired from datepicker 
* FG - Nov 2010 - Web3R 
* 
* version 0.0.3 : Fixed some settings, more dynamic 
* version 0.0.4 : Removed width:100% on tables 
* version 0.1.1 : set width 0 on tables to fix an ie6 bug 
*/ 

.ui-timepicker-test-inline { display: inline; } 

#ui-timepicker-test-div { padding: 0.2em; background-color: #fff; } 
.ui-timepicker-test-table { display: inline-table; width: 0; } 
.ui-timepicker-test-table table { margin:0.15em 0 0 0; border-collapse: collapse; } 

.ui-timepicker-test-hours, .ui-timepicker-test-minutes { padding: 0.2em; } 

.ui-timepicker-test-table .ui-timepicker-test-title { line-height: 1.8em; text-align: center; } 
.ui-timepicker-test-table td { padding: 0.1em; width: 2.2em; } 
.ui-timepicker-test-table th.periods { padding: 0.1em; width: 2.2em; } 

/* span for disabled cells */ 
.ui-timepicker-test-table td span { 
    display:block; 
    padding:0.2em 0.3em 0.2em 0.5em; 
    width: 1.2em; 

    text-align:right; 
    text-decoration:none; 
} 
/* anchors for clickable cells */ 
.ui-timepicker-test-table td a { 
    display:block; 
    padding:0.2em 0.3em 0.2em 0.5em; 
    width: 1.2em; 
    cursor: pointer; 
    text-align:right; 
    text-decoration:none; 
} 


/* buttons and button pane styling */ 
.ui-timepicker-test .ui-timepicker-test-buttonpane { 
    background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; 
} 
.ui-timepicker-test .ui-timepicker-test-buttonpane button { margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 
/* The close button */ 
.ui-timepicker-test .ui-timepicker-test-close { float: right } 

/* the now button */ 
.ui-timepicker-test .ui-timepicker-test-now { float: left; } 

/* the deselect button */ 
.ui-timepicker-test .ui-timepicker-test-deselect { float: left; } 


/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 
.ui-timepicker-test-cover { 
    display: none; /*sorry for IE5*/ 
    display/**/: block; /*sorry for IE5*/ 
    position: absolute; /*must have*/ 
    z-index: -1; /*must have*/ 
    filter: mask(); /*must have*/ 
    top: -4px; /*must have*/ 
    left: -4px; /*must have*/ 
    width: 200px; /*must have*/ 
    height: 200px; /*must have*/ 
} 
+0

謝謝你的幫助! :) – rafaelcb21