0
1
Fork 0
hedera-web-mindshore/js/htk/columns/date/index.js

39 lines
604 B
JavaScript

module.exports = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-date'
,Properties:
{
/**
* Format that applies to the value.
*/
format:
{
type: String
,set(x) {
this._format = _(x);
}
,get() {
return this._format;
}
}
}
,_format: _('%a, %e %b %Y')
,initialize(props) {
this._cssClass = 'cell-date';
Htk.Column.prototype.initialize.call(this, props);
}
,render(tr) {
var text = Vn.Date.strftime(this.value, this._format);
var td = Htk.Column.prototype.render.call(this, tr);
td.appendChild(this.createTextNode(text));
return td;
}
});