2013-07-17 84 views
0

如何從日期框中刪除當前日期。實際上,當我打開日期框時,它高亮顯示當前日期。但用戶選擇日期示例「14」。 如果用戶再次打開日期框,它會高亮顯示「14」和當前日期。 這裏是我的小提琴 http://jsfiddle.net/ravi1989/uhdYv/1/如何從jquery mobile的日期框中刪除當前日期?

<input name="mydate" id="mydate" type="date" data-role="datebox" class="documentDate_h" data-options='{"mode": "calbox","useNewStyle":true,"zindex":1200}' /> 

第一次點擊(+)上的標題按鈕。它顯示彈出。開日期框。它顯示今天的日期選擇任何日期。然後再次打開日期box.it顯示選定的日期和今天的日期。?

第二個問題如何更改星期一,星期二......的顏色?

回答

0
For changing color of the current date from its default theme "a" you can use this: 

    <input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "calbox", "useNewStyle":true, "themeDateToday": "e", "zindex":2000}'/> 

    Hence current date will be in yellow, instead of blue and choosen date can be default blue. 

    refer these sites for theming of the call box: 

    http://dev.jtsage.com/jQM-DateBox2/demos/fullopt.html 
    http://dev.jtsage.com/jQM-DateBox2/demos/api/themes.html 

There is no such setting for month text, so for "Tu We" etc override the class as per below: 

.ui-datebox-griddate-label { 
height: 15px!important; 
line-height: 15px!important; 
color: green; 
} 

要刪除當前日期的高亮和僅保持選定的日期被突出顯示,你可以這樣做:

但保留兩個,你會需要修改datebox的API代碼本身..

+0

其實我的問題是不同的.. !!其實今天的日期是選擇當用戶點擊另一個按鈕 –

+0

通常今天的日期突出顯示你不想這個功能?請清楚的要求... – Sheetal

+0

但如果你看到在我的小提琴17選擇當用戶選擇另一個日期。如何刪除.. ..? –