Search

'sencha'에 해당되는 글 1건

  1. 2012.07.03 Sencha dateformat (1)

Sencha dateformat

Programming/JavaScript, Sencha 2012.07.03 01:35 Posted by 파란크리스마스

출처 :
http://stackoverflow.com/questions/10496912/convert-date-from-json-format-to-other-formats-in-sencha
http://stackoverflow.com/questions/7848369/sencha-touch-date-format

소스

  Ext.regModel('dataModel', {
      fields: [
         {name: 'id', type: 'int'},
         {name: 'vod_id', type: 'int'},
         {name: 'comment', type: 'string'},
         {name: 'regid', type: 'string'},
         {name: 'regdate', type:'date', dateFormat: 'c'}
      ]
  });

  dataList = new Ext.List({
      title: 'VodComment목록',
      store: dataStore,
      scroll: false,
      layout:'fit',
      blockRefresh:true,
      itemTpl:'{comment} {regid} / {regdate:date("Y.m.d H:i:s")}'
  });

패턴

Date.patterns = {
    ISO8601Long : "Y-m-d H:i:s",
    ISO8601Short : "Y-m-d",
    ShortDate : "n/j/Y",
    LongDate : "l, F d, Y",
    FullDateTime : "l, F d, Y g:i:s A",
    MonthDay : "F d",
    ShortTime : "g:i A",
    LongTime : "g:i:s A",
    SortableDateTime : "Y-m-d\\TH:i:s",
    UniversalSortableDateTime : "Y-m-d H:i:sO",
    YearMonth : "F, Y"
};
신고


 

티스토리 툴바