Skip to content

Instantly share code, notes, and snippets.

View WeiB71's full-sized avatar

Narvert Doyle Del Carmen WeiB71

  • InsentryIQ
  • 02:59 (UTC +08:00)
View GitHub Profile
@WeiB71
WeiB71 / handsontableformatdaterenderer.txt
Last active July 20, 2018 03:05
handsontable to Format to MM/DD/YYYY
// sample render to used in handsontable
//need moment.js
function dateRenderer(instance, td, row, col, prop, value, cellProperties) {
Handsontable.renderers.TextRenderer.apply(this, arguments);
if (value != null) {
if (value!=null) {
var str = moment(value).format("MM/DD/YYYY h:hh A");
td.innerHTML = str;
}
}