Date.js 420 B

1234567891011121314151617181920
  1. /**
  2. * 在 ajax request 前修改url,增加服务端`basePath`
  3. * `basePath`在`app.json`配置
  4. */
  5. Ext.define('saas.override.form.field.Date', {
  6. override: 'Ext.form.field.Date',
  7. formatText: '',
  8. setValue: function (v) {
  9. var me = this;
  10. if(v && me.format) {
  11. v = new Date(v);
  12. v = Ext.Date.format(v, me.format);
  13. }
  14. me.callParent(arguments);
  15. },
  16. });