Hi,
I'm using SmartGWT 2.2 with Mozilla FF 3.6.10. I'm using DateTimeItem in the form a TextField & I've set displayFormat = DateDisplayFormat.TOEUROPEANSHORTDATETIME.
1. My first problem is when I enter value in it, it's taking format: 15/09/2010 00:00. (15th Sep, 2010). In my DB it's getting stored in format: Wed Sep 15 00:00:00 IST 2010.
So when I get value from DB & use setValue(), it's displaying in the same format as the one of DB.
Can anyone tell me how can I make both formats (Input & Display) same?
2. My second problem is if in case I can't change the display format & keep it as it is: Wed Sep 15 00:00:00 IST 2010, when I execute dynamicForm.validate(), it's showing me ERROR: startDate : Must be a date.
NOTE: dynamicForm is the form in which DateTimeItem is added & startDate is my reference variable name.
Thanks in advance.
I'm using SmartGWT 2.2 with Mozilla FF 3.6.10. I'm using DateTimeItem in the form a TextField & I've set displayFormat = DateDisplayFormat.TOEUROPEANSHORTDATETIME.
1. My first problem is when I enter value in it, it's taking format: 15/09/2010 00:00. (15th Sep, 2010). In my DB it's getting stored in format: Wed Sep 15 00:00:00 IST 2010.
So when I get value from DB & use setValue(), it's displaying in the same format as the one of DB.
Can anyone tell me how can I make both formats (Input & Display) same?
2. My second problem is if in case I can't change the display format & keep it as it is: Wed Sep 15 00:00:00 IST 2010, when I execute dynamicForm.validate(), it's showing me ERROR: startDate : Must be a date.
NOTE: dynamicForm is the form in which DateTimeItem is added & startDate is my reference variable name.
Thanks in advance.
Comment