开发者

extjs: fill red color in holidays

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

精彩评论

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