Announcement

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

    Custom Date Format

    Hello,

    I would like to use a custom date format in my ListGrid. Unfortunately I cannot use the date formats provided in DateDisplayFormat, as the dates in my country (Germany) are written with dots, not with slashes: e.g. 24.03.2009 instead of 24/03/2009

    Also, I have a case where I only want so display month and year of a date and not the day: e.g. 03/2009

    Is it possible to define custom date formats with SmartGWT?

    Your help is very much appreciated.

    Thanks,
    Rudiger

    #2
    You can use a cell formatter and format the date in the desired format using GWT's DateFormat class.

    Sanjiv

    Comment


      #3
      Thanks

      Ok, thanks! That worked really fine!

      Comment


        #4
        Is is also possible to use a custom date format in a DynamicForm? As far as I can tell, there is no way to specify a cell formatter for a FormItem.

        Comment


          #5
          Hi,

          How to format the date with an dynamicForm? I have the same problem ....

          No cell Formatter for a DateItem :-(

          Thanks

          Comment


            #6
            Look at the global input and output formatter methods in DataUtil.

            Comment


              #7
              Thank you, it works with the class DateUtil

              Comment


                #8
                Hi,

                Can anyone provide me with a sample code on using custom date format in list and form?

                Thank you.

                Comment


                  #9
                  how do we use CellFormatter and gwt DateFormat?

                  Comment


                    #10
                    great!! it really worked. :)

                    Comment

                    Working...
                    X