Announcement

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

    default "start of week" day for date picker

    Sorry, probably it was already discussed, but I couldnt find the answer

    In Europe week starting day is Monday. I could set it for Calendar, but how could I set it as default for all DateItem pickers?

    #2
    I have the same problem. Can anybody give some direction to solve?

    Comment


      #3
      Set the default DateChooser.firstDayOfWeek via SmartClient APIs. Some existing European locale files already do this.

      Comment


        #4
        Originally posted by Isomorphic
        Set the default DateChooser.firstDayOfWeek via SmartClient APIs. Some existing European locale files already do this.
        But method DateChooser.firstDayOfWeek is not a static method. Probably I am blind but how I get DateChooser instance from DateItem instance? I do not see any straightforward method.

        Thanks,

        Ales

        Comment


          #5
          As a workaround of this problem in the smartgwt.jar\com\smartclient\public\sc\modules\ISC_Forms.js I change:

          isc.A.firstDayOfWeek=0

          to:

          isc.A.firstDayOfWeek=1

          Comment


            #6
            You could also use this method from gwt. Maybe this is what Isomorphic ment.

            Code:
            public native void setFirstDayOfWeek1() /*-{
            	$wnd.isc.DateChooser.addProperties({ firstDayOfWeek: 1});
            }-*/;

            Comment


              #7
              Thanks, it is a better solution! :-)

              Comment

              Working...
              X