ExtJs, from the beginning to the present, I think you are a good spam ....
I have been using extjs for more than half a year and have experienced a series of tasks such as dizziness, bloat, big head, headache, and wall hitting ....... For example, the two items belong to two different modules, and the input time is exactly the same (after strict/various debugging). The problem is that one item correctly displays the time and the other item is not displayed, it's really cool .... It hurts... to avoid spam, paste the DateToYmd () method to the back.
{FieldLabel: 'Return time', xtype: 'datefield ', afterLabelTextTpl: required, format: 'Y-m-d', allowBlank: false, value: DateToYmd (me. headerData. data. planTime), blankText: getTextError (100000), name: 'plantime', itemId: 'P _ plantime', layout: 'anchor '},
{FieldLabel: 'shipping time', xtype: 'datefield ', afterLabelTextTpl: required, format: 'Y-m-d', allowBlank: false, value: DateToYmd (me. headerData. data. planTime), blankText: getTextError (100000), name: 'plantime', itemId: 'A _ plantime', layout: 'anchor '},
function DateToYmd(value) { if (!value) { return ""; } var dt = typeof (value) == 'string' ? new Date(value) : typeof (value) == 'Date' ? value : new Date(); return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate();}