Announcement

Collapse
No announcement yet.

Display Calendar with the year from the age 16 to 65 years old

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display Calendar with the year from the age 16 to 65 years old

    Hi,
    I'm new to scriptcase with little php knowledge.
    Recently i would like create a date field with a calendar display.
    But i wanna to limit the calendar year with the age conditions. For example, the years of the calendar in the range of age 16-65years old from the current year. So year 1949-2008 will be shown in calendar if the current year is 2014.

    I have try the minimum and maximum date in the field setting but the calendar is follow the limit year value, the result of the calendar is not what i want. Please help.
    Last edited by kklim; 01-23-2014, 06:39 AM.

  • #2
    anyone can help?

    Comment


    • #3
      What you can try is to use global variables in the properties of min and max date and fill that with your detail. I expect that you have to fiddle a lot as date functions and formats in php are pretty complicated. I never hadto do this so I haven't tried, but it's the way I would start to try.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Thanks Aducom,

        In my form application, i set the year limit to 60years in the date field setting.

        I try to read the possible source code for my form application.

        I found a php file which called xxxxxxx_jquery.php. In this php file, there is one function called scJQCalendarAdd, i found a variable "yearRange: 'c-30:c+30".

        So i guess this is the variable to limit the year range, it divides 60years into 2, begin and end year in datepicker (displayed calendar) with 30years.

        Here i got few question if my guess is right.

        Can i change the php file directly? Any special function in scriptcase to let us change the sourcecode? or any function/macro/function to prevent scriptcase overwriting the source when we regenerate the source code (update the application)? Sorry, I'm new in scriptcase. Maybe my question doesn't make sense.

        Comment


        • #5
          The only legal place to influence the code are the events. I highly advise *not* to change generated code as it will be overwritten on every new generation.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment

          Working...
          X