AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## **html 页面** ``` {{vm.datetime|momentFormat:'YYYY-MM-DD'}} ``` vm.datetime:是变量 ## **js页面 KendoGrid 中** ``` vm.detaiKendoGrid.init({ id: 'poDtialTable', model: { fields: { requiredDate: { type: 'date', editable: false }, } }, columns: [{ { title: '时间', field: 'requiredDate', width: 120, headerAttributes: { style: "text-align: center;" }, attributes: { style: 'text-align: center;' }, format: '{0:yyyy-MM-dd }', } }] }); ``` ## **js中 moment 方法** ``` moment(creationTime).format('YYYY-MM-DD HH:mm:ss');//creationTime 需要格式化时间的变量 moment().subtract(0, 'days').startOf('day'); //当天早上0点 moment().endOf('day'); //当天晚上24点 ``` 例如 KendoGrid 中 ``` template: function (dataItem) { return moment(dataItem.creationTime).format('YYYY-MM-DD HH:mm:ss'); } ```