开发者

extjs: fill red color in holidays

I am testing with Extjs demo.

http://ext.ensible.com/deploy/dev/examples/calendar/remote.html

I have some holidays: for examples 2011-03-23, 2011-04-11,... I want to fi开发者_开发技巧ll red color that holidays

How I can do? Thank you.


Try something like

for (i = 0; i < columnCount; i++)
 for (k =0; k < rowCount; k++)
 { 
   var record = grid.getStore().getAt(k);  
   var fieldName = grid.getColumnModel().getDataIndex(i); 
   var val = record.get(fieldName);
   if (isHiliday(val)) 
   {
     var cell = grid.getView().getCell(k, i);
     var el = Ext.get(cell);
     el.addClass('background-red-style');
   }
 }

and do not forget to include

.background-red-style
{
  background-color: red;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜