Topic
9 replies Latest Post - ‏2012-12-20T15:44:17Z by Codeoline
Codeoline
Codeoline
141 Posts
ACCEPTED ANSWER

Pinned topic Dtae/Time in future

‏2012-12-18T20:45:15Z |
I would like the date/time picker to open in the future (April 01, 2013).
Is there a way to do this?
Updated on 2012-12-20T15:44:17Z at 2012-12-20T15:44:17Z by Codeoline
  • gsager
    gsager
    129 Posts
    ACCEPTED ANSWER

    Re: Dtae/Time in future

    ‏2012-12-19T14:40:16Z  in response to Codeoline
    One way to do this is to set the initial value of the input variable to default to a date in the future before displaying the form. When the picker is chosen it will use this date as the default value.

    So in the model I tried it in, I created an action list that did the assignment of the input variable to 2013-04-01 and then called the method to display the input form.
    • Codeoline
      Codeoline
      141 Posts
      ACCEPTED ANSWER

      Re: Dtae/Time in future

      ‏2012-12-19T16:46:05Z  in response to gsager
      That would be great.
      Is it possible to post your model?
  • gsager
    gsager
    129 Posts
    ACCEPTED ANSWER

    Re: Dtae/Time in future

    ‏2012-12-19T18:50:53Z  in response to Codeoline
    This model uses the provider from the order service provider model from the Building models feature set.
    • Codeoline
      Codeoline
      141 Posts
      ACCEPTED ANSWER

      Re: Dtae/Time in future

      ‏2012-12-19T19:13:57Z  in response to gsager
      Would i call this Action List from the Advanced tab of the DSUI under Action Before Create?
      • gsager
        gsager
        129 Posts
        ACCEPTED ANSWER

        Re: Dtae/Time in future

        ‏2012-12-19T19:20:16Z  in response to Codeoline
        Yes with dsui you would do that. but the action list would only have to have the assignment not the call to the create page.
        • gsager
          gsager
          129 Posts
          ACCEPTED ANSWER

          Re: Dtae/Time in future

          ‏2012-12-19T19:24:19Z  in response to gsager
          It doesn't have to be an action list it could easily be a method or an ljo where you call into java to get the current date if you need that to figure out the default value.
        • Codeoline
          Codeoline
          141 Posts
          ACCEPTED ANSWER

          Re: Dtae/Time in future

          ‏2012-12-19T19:33:15Z  in response to gsager
          Well this kind of works. The dates are now set on 04/01/2013 when the portlet opens, but i really dont want the dates pre-loaded. only need the dates if the user want to use the dates. They are not required. What i would like to see is when the user decides he would like to enter a date he would click on the calendar and the calendar would open to 04/01/2013. Is there a way to accomplish this? Thank You for all your help.
          • gsager
            gsager
            129 Posts
            ACCEPTED ANSWER

            Re: Dtae/Time in future

            ‏2012-12-20T15:22:24Z  in response to Codeoline
            If you add an attribute setter to the page and set the dropDownDefaultValue to the date you want it will default the picker to the correct date.
            • Codeoline
              Codeoline
              141 Posts
              ACCEPTED ANSWER

              Re: Dtae/Time in future

              ‏2012-12-20T15:44:17Z  in response to gsager
              That is EXACTLY what I wanted.
              I picked up a lot of information in this lesson on assigning values.
              Thank You.