Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
{{renderer:function(instance, td, row, col, prop, value, cellProperties){console.log(value);if(parseInt(value)<60){td.innerHTML="<span style='color: white; background-color: green;'>"+value+"</span>";}else{td.innerHTML="<span style='color: white; background-color: red;'>"+value+"</span>";}}}}

 

Date Picker with Customer Renderer

Code Block
languagejs
{{type:'date',dateFormat:'MM/DD/YYYY',correctFormat:true,defaultDate:'01/01/1900',datePickerConfig:{firstDay:0,showWeekNumber:true,numberOfMonths:3,disableDayFn:function(date){return date.getDay()===0 || date.getDay()===6;}},renderer:function(instance, td, row, col, prop, value, cellProperties){Handsontable.renderers.TextRenderer.apply(this, arguments);td.style.backgroundColor = 'green';}}}

...