Found a bug in RestDataSource when JSON is used: transformRequest does not call serializeFields, thus logical date and logical time fields are sent as a full GMT date. In my case, after saving a date the day decreased by one - it was sent as "2010-07-15T21:00:00".
Also, how to add a leading zero for default date formatters? I would like to use standard ISO format "YYYY-MM-DD HH:MM" (or without time) and toJapanShortDateTime does this except for the leading zero. Date._toShortDate should add Number._lzero, but setting it manually at the beginning does not work and I do not want to write my own function:
Since Number._1zero is defined in Number.js, I assume that there is spelling mistake.
Thanks.
Also, how to add a leading zero for default date formatters? I would like to use standard ISO format "YYYY-MM-DD HH:MM" (or without time) and toJapanShortDateTime does this except for the leading zero. Date._toShortDate should add Number._lzero, but setting it manually at the beginning does not work and I do not want to write my own function:
Code:
Date.prototype.setDefaultDateSeparator("-"); Date.setShortDatetimeDisplayFormat("toJapanShortDateTime"); Date.setShortDisplayFormat("toJapanShortDate"); Date.setInputFormat("YMD"); Number._lzero = "0";
Thanks.
Comment