I have date and time fields defined like this:
{name:"dateofaccident", title:"Date Of Accident", type:"date", useTextField: true,
width: 120, endRow: true, colSpan:2, dateFormatter:"toUSShortDate"}
{name: "timeofaccident", title: "Time Of Accident", type: "time", timeFormatter:"to24HourTime", endRow: true, colSpan:2}
Here is a DS:
isc.DataSource.create({
ID:"General",
dataFormat:"xml",
dataURL:"../../accidents/forms/accidents.asp?requesttype=post&datarequest=xml&methodexecute=mSaveApplicationData&formname=General",
dataProtocol:"postParams",
recordXPath:"//general",
fields:[
{name:"id", primaryKey:true, hidden:true, type:"sequence"},
{name:"dateofaccident", required:true},
{name:"timeofaccident"},
......
Data I am getting on the server looks like this:
2008-01-09T06:00:00 - dateofaccident
2008-02-21T04:34:00 - timeofaccident
But what I want is:
01/09/2008 - dateofaccident
4:34 - timeofaccident
What am I doing wrong? Thanks for help
{name:"dateofaccident", title:"Date Of Accident", type:"date", useTextField: true,
width: 120, endRow: true, colSpan:2, dateFormatter:"toUSShortDate"}
{name: "timeofaccident", title: "Time Of Accident", type: "time", timeFormatter:"to24HourTime", endRow: true, colSpan:2}
Here is a DS:
isc.DataSource.create({
ID:"General",
dataFormat:"xml",
dataURL:"../../accidents/forms/accidents.asp?requesttype=post&datarequest=xml&methodexecute=mSaveApplicationData&formname=General",
dataProtocol:"postParams",
recordXPath:"//general",
fields:[
{name:"id", primaryKey:true, hidden:true, type:"sequence"},
{name:"dateofaccident", required:true},
{name:"timeofaccident"},
......
Data I am getting on the server looks like this:
2008-01-09T06:00:00 - dateofaccident
2008-02-21T04:34:00 - timeofaccident
But what I want is:
01/09/2008 - dateofaccident
4:34 - timeofaccident
What am I doing wrong? Thanks for help
Comment