2 Replies Latest reply on Nov 19, 2008 10:29 AM by Gregory Lafrance

    DateField Problem

    Level 1

      Hi All,
      I have a problem with DataField.How to get the "First day date of the week and Last day date of the week".
      I need because of filtering the date based on Currentweek,LastWeek,NextWeek,Today....etc.

      Please tel me if u know .........

      Thanks in advance,
      Nag.

        • 1. Re: DateField Problem
          Gregory Lafrance Level 6
          This code access the Flex framework resource bundles located here:

          C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\projects\framework\bundles\LOCALE\src\controls.properties

          C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\projects\framework\bundles\LOCALES\src\SharedResources.properties
          • 2. Re: DateField Problem
            Gregory Lafrance Level 6
            I should add that the following in my code could be erroneous:

            arr[resourceManager.getString('controls','firstDayOfWeek')];

            It depends on how this is localized in SharedResources.properties:

            dayNames=Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday

            If for French it is localized like this my code is fine:

            dayNames=Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi

            but if it is localized like this:

            dayNames=Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi,Dimanche

            then my code should be changed to:

            arr[0];

            This is because my code assumes the order of the names of the days in dayNames will be the same as for English, and that may not be the case.