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