Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateTimeItem display format problem

    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.

    #2
    What server integration approach are you using? Whatever it is, use Pro and you don't have to deal with issues of how dates are transmitted, it just works.

    Comment


      #3
      Thanks for your reply but for me it's not possible to use Pro.
      I just came to know that for my problem I can do parsing or formatting. But that too I'm not aware of how to use it. I expect someone who can tell me how to parse or format a String to Date in a desired format.

      Comment

      Working...
      X